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

infinity
infinity 2019년 6월 21일
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에 대해 자세히 알아보기

질문:

2019년 6월 21일

댓글:

2019년 6월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by