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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Matrix operations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

amorris

Canada
Posts

Posted - 05/17/2007 :  5:54:13 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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?

Deanna

China
Posts

Posted - 05/17/2007 :  10:46:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

amorris

Canada
Posts

Posted - 05/24/2007 :  2:56:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000