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
 Matrix size limited?

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
Belsinga Posted - 06/21/2010 : 04:14:04 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8 SR 6
Operating System: WinXP

Hi,

Is it possible to construct a matrix with #rows larger than 180? My script doesnt work when I try to call, and returns
" Vector operation dimension check error "

************************************
matrix MAT(201,4);

for(int jj=0; jj<4;jj++)
{
for(int ii=0; ii<201; ii++)
{
MAT[ii][jj] = ...;
}
}
3   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 06/22/2010 : 04:20:11 AM
Hi,

It will be better to use the GetNumRows and GetNumCols methods to get a matrix's dimension.

Penn
Belsinga Posted - 06/22/2010 : 04:04:10 AM
I see what the problem was: my dataset was erroneously only filled up to 180, when I expected 201...

Thanks anyway!
Penn Posted - 06/22/2010 : 03:43:27 AM
Hi,

Sorry that I can not reproduce the error you mentioned with the following code. The code works fine.

void testMatrix()
{
	matrix MAT(201,4);

	for(int iCol=0; iCol<MAT.GetNumCols(); iCol++)
	{
		for(int iRow=0; iRow<MAT.GetNumRows(); iRow++)
		{
			MAT[iRow][iCol] = iRow*iCol;
			printf("MAT[%d][%d] = %f\n", iRow, iCol, MAT[iRow][iCol]);
		}
	}
}

It will be better to get your entire code to make sure what the problem is.

Penn

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