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
 Origin Forum
 Matrix operations

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
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

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