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