T O P I C R E V I E W |
amorris |
Posted - 05/17/2007 : 5:54:13 PM Origin Version (Select Help-->About Origin): 7.5sr6 Operating System: Suse 10.2 (via virtual windows XP on vmware)
Hi everyone,
I have a pretty simple question: how can I subtract two matrices and put the data in a third matrix? I haven't found anything via the graphical interface or the help menu. If my thee matricies are M1,M2,M3, I tried in the script window saying M3=M2-M1, but it doesn't always give the correct answer!
This is really weird. If I manually create three matricies and enter some numbers by hand it gives the correct result. However, when I try the same with data that I imported into the matricies, the result is erroneous.
Can anyone enlighten me?
|
2 L A T E S T R E P L I E S (Newest First) |
amorris |
Posted - 05/24/2007 : 2:56:13 PM Thanks Deanna that was really helpful. I didn't realize that subtracting while in image mode would not work. Also, I think that my third matrix was of the wrong dimensions. I didn't catch this because when I was testing by manually creating three matricies, all matricies were of the same dimension (the default size), whereas when actual data was imported the size of the matricies changed.
Alexis |
Deanna |
Posted - 05/17/2007 : 10:46:05 PM Hello Alexis,
I have imported two images with same dimension into two different matrices in Origin 7.5 and subtract them. The result is correct in my case.
However, subtracting while the image mode on will produce wrong result. I wonder whether you have turned the image mode on?
Another thing that might be related: the matrix subtraction is correct only when all matrices, including the one for storing the result, have the same dimension. Did you set the dimension of M3?
Deanna OriginLab Technical Services |
|
|