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