Deat Tom,
thanks a lot for the help last time. Now I search for a way to automatically attach a number to the name of an integer.
I have the following procedure, where I want to compute the mean for different periods and store this mean in integer a.
To prevent that a is overwritten within the loop I want to number integer "a" by the value of i.
But some how I cant find the value a1, a3 ...
Where is the error?
dofor i = 1 3 6 12 24
stats claw12tayuk firstob+range+length lastob-i
comp a = %mean
comp a +(i) = a
end dofor
Is there something like a series window for integers, where I can see all integers defined in the program?
Thanks a lot
automatically numbering integer values
Re: automatically numbering integer values
That won't work. The only things that can be created with created variable names are series. I'm not sure what you want to do with them, but this might work better:paretto wrote:Deat Tom,
thanks a lot for the help last time. Now I search for a way to automatically attach a number to the name of an integer.
I have the following procedure, where I want to compute the mean for different periods and store this mean in integer a.
To prevent that a is overwritten within the loop I want to number integer "a" by the value of i.
But some how I cant find the value a1, a3 ...
Where is the error?
dofor i = 1 3 6 12 24
stats claw12tayuk firstob+range+length lastob-i
comp a = %mean
comp a +(i) = a
end dofor
Code: Select all
compute [vect[int]] ends=||1,3,6,12,24||
dec vect a(%size(ends))
do i=1,%size(ends)
stats claw12tayuk firstob+range+length lastob-ends(i)
compute a(i)=%mean
end do iThe closest thing to this is the View--User Variables operation. Pick the "Scalars".paretto wrote: Is there something like a series window for integers, where I can see all integers defined in the program?