Matrix to Series
Re: Matrix to Series
So about indexing, now i am getting this error:
## MAT13. Store into out-of-range %X(2015,23)
The Error Occurred At Location 898, Line 43 of loop/block
where i have 4 loops, 3 nested inside 1 of them:
The total lines of code I have is 698 lines -
So when it says Error is at location 898 how to locate that? and also when i count the lines 1 to 43 within the loop, should i ignore lines that have descriptions and start with *?
Regards,
Ateeb
## MAT13. Store into out-of-range %X(2015,23)
The Error Occurred At Location 898, Line 43 of loop/block
where i have 4 loops, 3 nested inside 1 of them:
The total lines of code I have is 698 lines -
So when it says Error is at location 898 how to locate that? and also when i count the lines 1 to 43 within the loop, should i ignore lines that have descriptions and start with *?
Regards,
Ateeb
Re: Matrix to Series
The "location" is unlikely to be much help. (We can use it in debugging the software, but it doesn't really help a user). The line count includes comments, and includes continuations---RATS has the line number in the status field at the bottom of the application windows so you just want to go 48 lines down from the DO.
What are you doing with %X? That's a throwback to version 3 or so.
What are you doing with %X? That's a throwback to version 3 or so.
Re: Matrix to Series
I found %X to be a good way to setup entries for my variables, I am having hard time understanding how to put variables in columns and observations in rows and doing operations on them ...
Re: Matrix to Series
If you're using %X to do data transformations, you're doing something wrong. You want to keep series as series as long as possible---in most cases, throughout the program. Matrices should be used when you are manipulating them as a whole, not element by element. The MAKE instruction can be used to create a specific matrix out of a specific range of a specific set of series when you need it (though often you don't even need that---instructions like CMOM and MCOV can create most of the important derived matrices without ever directly creating an "X" matrix).
Re: Matrix to Series
Hi Tom and everybody,
Thanks for your answers. I have this doubt: How to turn a gset of vectors[2x1] into two different sets separately?. First, I tried doing a loop, but it seems to consume time computing unnecessarily.
Regards.
Thanks for your answers. I have this doubt: How to turn a gset of vectors[2x1] into two different sets separately?. First, I tried doing a loop, but it seems to consume time computing unnecessarily.
Regards.
Re: Matrix to Series
Something like:
dec series[vect] asvects
gset asvects = %ranmat(2,1)
set series1 = asvects(t)(1)
set series2 = asvects(t)(2)
dec series[vect] asvects
gset asvects = %ranmat(2,1)
set series1 = asvects(t)(1)
set series2 = asvects(t)(2)