Author |
Topic  |
|
Piasecki
Poland
Posts |
Posted - 12/01/2004 : 12:15:14 PM
|
Origin Version (Select Help-->About Origin): 6.1 Operating System:WinXP
Hi everybody, I have a matrix 179 columns x 45 rows. After an attempt of dividing all the cells by any number, e.g. Cell(i,j)=Cell(i,j)/1.0 I get a matrix 45 x 45.
What I can do? Eryk
|
|
Mike Buess
USA
3037 Posts |
Posted - 12/01/2004 : 1:34:11 PM
|
Hi Eryk,
An Origin matrix is really just a long dataset and its cells aren't individually addressable like those of a wks. If you want to divide all cells of Matrix1 by a number (say 10) just do this...
Matrix1 /= 10;
Mike Buess Origin WebRing Member |
 |
|
easwar
USA
1965 Posts |
Posted - 12/01/2004 : 1:51:10 PM
|
Hi Eryk,
I presume you were using the Set Values dialog for the matrix. You can use the cell(rownum, colnum) function to access the matrix cell values and so what you were doing is okay. The cell function can also be used in script window when the matrix is active, such as to get the value of a particular cell at a particular row-col location. Of course if you want to perform a simple scale operation on the entire matrix, you can also do what Mike Buess suggested above in the script window.
I tried and it works fine, but I could not reproduce the problem of the dimension changing when setting values.
Easwar OriginLab
|
 |
|
Piasecki
Poland
Posts |
Posted - 12/01/2004 : 2:55:20 PM
|
Hi Easwar, Unfortunately I get repeatedly the same effect. I just now generated such a matrix again, filled it with the cell(i,j)=1000 command and then divided all the cells by 1000 in matrix/set values window. I got the matrix cut off, with quite weird 3D graph resulting... Did you use the 6.1 version? Concerning the advice of Mark: probably it's you solution is OK, but... I never used the scripts, so I don't know how to execute them.
Eryk
|
 |
|
easwar
USA
1965 Posts |
Posted - 12/01/2004 : 3:07:12 PM
|
Hi Eryk,
We tried 6.01 SR0 and versions higher from that and could not reproduce the problem of the matrix changing dimension when setting values. You should contact/call tech support so that they can work with you to see why this is occuring for you.
As for executing script, like Mike said, you just open the script window (Window->Script Window menu command), then type the command such as Matrix1/=10 and hit the enter key. For script with many lines, one can create OGS script files with sections and execute them. Please see help files for documentation on how to do that. And in versions 7.0 and higher, matrix values can be manipulated using Origin C code as well.
Easwar OriginLab
|
 |
|
easwar
USA
1965 Posts |
Posted - 12/01/2004 : 5:34:22 PM
|
Hi Eryk,
Just wanted to clarify one thing...the Set Matrix Values dialog has For rownum to rownum and For colnum to colnum edit boxes at the top right which if not set to whole dimension of matrix will then only change the values in the range that you specify with those controls.
Is that what you are seeing? That only a part of the matrix changes values? Or is the dimension itself changing/truncating? After setting the values using this dialog, can you then open the Matrix->Set Dimensions dialog and recheck what the dimesions are for x and y? Are they different from what you started with?
Easwar OriginLab
|
 |
|
|
Topic  |
|
|
|