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
 multi-function calculation within for statment

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
zknauss Posted - 08/19/2022 : 11:12:52 AM
Hello I'm trying to get the below script working so that the slope and the inverse slope will be valculated in rows one and two for each column 1 through "i". I keep getting the cannot assign a vector to a scaler
#Command Error!. Thanks in advance for any help with this.

page.active$ = Frequency_N_CON_T1;
for (int i = 1; i <= wks.ncols; i++ ) { range aa = [NCONT1Peak]"Center max"!$(i); range bb = [NCONT1Peak]"Peak Index"!$(i); wcol(i)[1] = movslope(aa,bb); wcol(i)[2] = movslope(bb,aa); }

ZTK
1   L A T E S T    R E P L I E S    (Newest First)
AmandaLu Posted - 08/21/2022 : 11:12:16 PM
Hi,

If you just need slope but not moving slope, please use “slope” function instead.

for (int ii = 1; ii <= wks.ncols; ii++ ) {
range aa = [NCONT1Peak]"Center max"!$(ii); range bb = [NCONT1Peak]"Peak Index"!$(ii); wcol(ii)[1]=slope(aa,bb); wcol(ii)[2]=slope(bb,aa);
}

https://www.originlab.com/doc/LabTalk/ref/Slope-func
https://www.originlab.com/doc/LabTalk/ref/Movslope-func

Thanks,
Amanda
OriginLab Technical Service


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