error on estimation SAR (Spatial Auto-regressive)

% 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 个评论

Hello,
The error means that the "vec" variable has not been defined.
I think what you can do is to define it first.

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Environment and Clutter 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by