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
 Error!! Failed to initialize range from string

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
mecsumit Posted - 05/02/2013 : 06:48:25 AM
I have a matrix data (46*401) in the form of one column, col(1) . I am trying to smooth the data row wise (i.e. in a set of 401 points). So I selected the range with k(start of the range) and m(end of the range) variable, as shown in the code below. But when I am executing the code it gives an error... ¨Failed to initialize range from string, VarName = iy, VarValue = ¨


loop(i, 1, 46)
{
k=401*(i-1)+1;
m=401*i;

smooth iy:=Col(1)[k:m] method:=1 npts:=300 boundary:=1 oy:=Col(2)[k:m]
}

Where is the problem in the code, how can I solve it?

Thanks
-sumit

Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
2   L A T E S T    R E P L I E S    (Newest First)
mecsumit Posted - 05/02/2013 : 08:26:55 AM
Thanks a lot cdrozdowski. Though, I already tried putting int k, int m before, but that didn't work.
BUT, now putting the $(k), $(m) the code runs like charm.. :-)

You made my work half ;)

Thanks a lot again...

quote:
Originally posted by cdrozdowski111

Define k and m as:

int k = 401*(i-1)+1;
int m = 401*i;

And see if that helps.

If not then change the range to:

Col(1)[$(k):$(m)]

And see if that helps. I'm not at my computer and can't double check.

cdrozdowski111 Posted - 05/02/2013 : 07:52:10 AM
Define k and m as:

int k = 401*(i-1)+1;
int m = 401*i;

And see if that helps.

If not then change the range to:

Col(1)[$(k):$(m)]

And see if that helps. I'm not at my computer and can't double check.

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