The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Minimum

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Chris2 Posted - 10/04/2010 : 06:49:38 AM
Windows Vista
Origin 8.1.

Hello,

another question, how is it possible to get the minimum of one specefic row, but noch from the whole row but just for example from column 3 to 9.

2   L A T E S T    R E P L I E S    (Newest First)
rlewis Posted - 10/04/2010 : 11:23:22 AM
Try This ....

double GetWksRowInfo(uint nRow, uint iBgn, uint iEnd)
{
	Worksheet WksSource=Project.ActiveLayer();
    if(WksSource.IsValid()==true && nRow<WksSource.GetNumRows() && iBgn<iEnd && iEnd<WksSource.GetNumCols())
    {
    	/*
    		nRow ...   Row number to be analyzed (0 Offset)
    		iBgn ...   Starting Column Number  (0 Offset)
    		iEnd ...   Ending Column Number    (0 Offset)
    	*/
	   matrix mat;
	   if(mat.CopyFromWks(WksSource,0,-1,nRow,nRow )==true)
	   {
			vector<double> vecRow;
			if(mat.GetAsVector(vecRow)>0)
			{
				vector<double> vctSub;
				if(vecRow.GetSubVector(vctSub,iBgn,iEnd)==0)
				{
				
					return (min(vctSub));
				}
			}
		}
   }
   return (NANUM);
}

Chris2 Posted - 10/04/2010 : 10:08:04 AM
For some reason I can't edit my topic. So I do it this way:

noch = not

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000