Author |
Topic  |
|
sshkrv
USA
4 Posts |
Posted - 05/21/2014 : 09:56:05 AM
|
hi guys, can u help me please with making a script? I got these spetra (posted image). And i tried to get the hafwidth of each. But I didn't get how to make it for each (each column) of them, using a cicle.
the only script i got is written below

the script
min1_index = 1; min1 = %c[1]; for(i=2; i<=390/2; i++) { if(%c[i] < min1) { min1 = %c[i]; min1_index = i; }; };
for(i=1; i<=min1_index; i++) { %c[i] = 0; }
min2 = %c[390/2]; min2_index = 390/2;
for(i=390/2; i<=390; i++) { if(%c[i] < min2) { min2 = %c[i]; min2_index = i; }; };
for(i=min2_index; i<=390; i++) { %c[i] = 0; }
this one removes tails
ssh
thanks for your attention
|
Edited by - sshkrv on 05/21/2014 10:01:44 AM |
|
lkb0221
China
497 Posts |
Posted - 05/21/2014 : 5:17:13 PM
|
Hi,
You can try doc -e DY {script} to loop through all data plots in the current graph window.
During the script, %H contains the window name and %C the dataset name in each iteration.
Zheng OriginLab |
 |
|
sshkrv
USA
4 Posts |
Posted - 05/23/2014 : 5:58:36 PM
|
quote: Originally posted by lkb0221
Hi,
You can try doc -e DY {script} to loop through all data plots in the current graph window.
During the script, %H contains the window name and %C the dataset name in each iteration.
Zheng OriginLab
thank you! but can you give an example of code, using this function, please?
ssh |
 |
|
lkb0221
China
497 Posts |
Posted - 05/27/2014 : 3:42:29 PM
|
Hi,
I think you just need to put the script you posted into the bracket, for example:
doc -e DY { min1_index = 1; min1 = %c[1]; ...... %c[i] = 0; } }
Zheng OriginLab |
 |
|
|
Topic  |
|
|
|