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
 Subtracting value from all cells of a matrix/sheet

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
Sommerfeld Posted - 11/07/2020 : 3:53:14 PM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2018 64 bit
Operating System: Windows 10

Dear all,

I would like to subtract the minimum value of a matrix from every cell.
I am not familiar with the command window and only found that "min(Matrixname)=" gives the minimum value as an output. Could somebody help me out with the correct syntax for the subtraction?

Besides could you tell me where I could find a good starting point to learn the available command syntax?

Best Regards
4   L A T E S T    R E P L I E S    (Newest First)
Sommerfeld Posted - 11/09/2020 : 10:56:13 AM
Yes that solves the problem, the matrix was created from a sheet and therefore had the mentioned lock icon.
Chris D Posted - 11/09/2020 : 10:36:07 AM
Any chance that the matrix values were generated by some sort of operation and they are locked by a lock icon?

If so, you can't change their values as outlined.

You'd have to set the recalculation to None via the lock icon.

Then CP's suggestions would work.



Thanks,
Chris Drozdowski
Originlab Technical Support
Sommerfeld Posted - 11/09/2020 : 07:27:30 AM
Thanks very much for your answer. When I tried using
quote:
Originally posted by cpyang

%C-=min(%C)

MBook1 -= min(MBook1)




the vlaues of the matrix remained unchanged without any
error message.
cpyang Posted - 11/08/2020 : 10:47:44 AM
In LabTalk, %C is the active dataset, and a matrix can be calculated like a dataset, so the following will work

%C-=min(%C)


Alternatively, you use the name of the matrix book, like
MBook1 -= min(MBook1)



Here would be a good starting point for LabTalk

https://d2mvzyuse3lwjc.cloudfront.net/doc/LabTalk/guide/Getting-Started-with-LT


CP

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