Good morning,
I need to multiply a series by an element of a matrix, For instance :
I've got a series named varY, a matrix myMat, and I want to create a new series varX which is the product of element 1 of myMat and varY.
series varX = myMat(1) * varY
The only way I can do that is if I assign myMat(1) to a scalar; scalar temp = myMat(1) and then series varX = temp * varY.
I wonder why I cannot multiply a series by an element of a matrix.
Thanks!
Danny
multiplying a series by an element of a matrix
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: multiplying a series by an element of a matrix
Works fine for me:
Code: Select all
create u 10
matrix(3,3) mymat
mymat = 5.5
series y = 2
series varx = mymat(1,1)*y
Re: multiplying a series by an element of a matrix
Hi,
You are right, it works perfectly.
My mistake. Since I had created a matrix with only one column, I thought I did not need to specify the column in the expression series varX = myMat(1) * varY
So, the right way is to write series varX = myMat(1,1) * varY
Thanks a lot for helping me.
Danny
You are right, it works perfectly.
My mistake. Since I had created a matrix with only one column, I thought I did not need to specify the column in the expression series varX = myMat(1) * varY
So, the right way is to write series varX = myMat(1,1) * varY
Thanks a lot for helping me.
Danny
Who is online
Users browsing this forum: No registered users and 2 guests
