%SOLVE(A,B)

Econometrics questions and discussions
apollon
Posts: 17
Joined: Thu Sep 30, 2010 8:01 am

%SOLVE(A,B)

Unread post by apollon »

Input:
declare vector[integer] identity(17)
ewise identity(i)=1
declare rect[integer] d(17,17)
ewise d(i,i)=1
dis %SOLVE(d,identity)

Output:
Can't Find Match for %SOLVE(IMATRIX,INDEX). Closest Match is %SOLVE(RECTANGULAR,VECTOR)
## SX27. Illegal Combination of Data Types for Operation

Does anyone see what's wrong with my program ? Specifically, the vector I created called identity is recognised as an INDEX
from the %Solve function. Not sure why is that, any help is appreciated.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: %SOLVE(A,B)

Unread post by TomDoan »

apollon wrote:Input:
declare vector[integer] identity(17)
ewise identity(i)=1
declare rect[integer] d(17,17)
ewise d(i,i)=1
dis %SOLVE(d,identity)

Output:
Can't Find Match for %SOLVE(IMATRIX,INDEX). Closest Match is %SOLVE(RECTANGULAR,VECTOR)
## SX27. Illegal Combination of Data Types for Operation

Does anyone see what's wrong with my program ? Specifically, the vector I created called identity is recognised as an INDEX
from the %Solve function. Not sure why is that, any help is appreciated.
You don't want to use VECT[INT] or RECT[INT] for any matrix calculations; those are really just for bookkeeping. If you change to:

declare vector[real] identity(17)
ewise identity(i)=1
declare rect[real] d(17,17)

it will work.
Post Reply