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
 [solved] adding row and columns to a matrix

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
Simon.N Posted - 07/17/2007 : 07:10:41 AM
Origin Version (Select Help-->About Origin): 7 SR2
Operating System: Vista

Hi,

I am using matrix and vectors to store some data from a datasheet, for later analysis.
Since I cannot know how many rows I will need, I tried to add rows dynamically, but I didn't find any function in the Origin help.

My matrix are global variables. I wrote a function which redifined the matrix, with greater number of rows. (with eventually a temporary matrix to store the data of the main matrix to copy it in the first row of the new extended matrix.)

But since i do those operations in a function, it seems that the range of the extended matrix is limited to this function. So, finally, my matrix is still too small.

Then I thought that I could give my function the adress of the matrix, in order to avoid the problem of the range, but i didn't find how to free the memory occupied by the smaller instantation of my matrix.

Am I on the right way ? Otherwise, how could I bypass this problem please ?

Thanks,

Simon Nicolas.


Edited by - Simon.N on 07/17/2007 08:29:02 AM
2   L A T E S T    R E P L I E S    (Newest First)
Simon.N Posted - 07/17/2007 : 08:07:44 AM
Thanks Mike,

It works fine even without upgrading to SR4.


Simon.
Mike Buess Posted - 07/17/2007 : 07:27:26 AM
Hi Simon,

Use matrixbase::SetSize to add or subtract rows or columns. (You might need to update to SR4.)

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/17/2007 07:39:14 AM

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