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 for Programming
 LabTalk Forum
 calculating the halfwidth of gaussian peak

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
sshkrv 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
3   L A T E S T    R E P L I E S    (Newest First)
lkb0221 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
sshkrv 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 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

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