error on estimation SAR (Spatial Auto-regressive)
Show older comments
% PURPOSE: An example of using sar_jihai_time
clear all;
W=wrook(7);
[n junk] = size(W);
In = eye(n);
t=10;
kx = 1;
info = struct('n',n,'t',t,'rmin',0,'rmax',1,'lflag',0,'tl',1,'stl',1,'ted',1); %ted=1 or ted=2
y=randn(n,t+1);
x1=randn(n,t);
x2=randn(n,t);
y=vec(y);
if kx==0
x=[];
else
x=[vec(x1),vec(x2)];
%x=[(x1),(x2)];
end
result0 = sar_jihai(y,x,W,info);
result1 = sar_jihai_time(y,x,W,info);
The error is
Undefined function or variable 'vec'.
Any help is appreciated.
1 Comment
infinity
on 21 Jun 2019
Hello,
The error means that the "vec" variable has not been defined.
I think what you can do is to define it first.
Answers (0)
Categories
Find more on Environment and Clutter in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!