Author |
Topic  |
|
Simon.N
France
Posts |
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 |
|
Mike Buess
USA
3037 Posts |
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 |
 |
|
Simon.N
France
Posts |
Posted - 07/17/2007 : 08:07:44 AM
|
Thanks Mike,
It works fine even without upgrading to SR4.
Simon. |
 |
|
|
Topic  |
|
|
|