您好,假设未定义函数或变量 'location'.?这个该怎么解决?

function spot(movie_name,annotations)

addpath 'libsvm'
filetype=1;
npart=length(annotations);

% Get list of images and movie properties
Obj = VideoReader(movie_name);
nFrames = Obj.NumberOfFrames;

% Some parameters for the experiment
sbin = 8; % size of HOG block
num = 10; % number of frames for which we always add positive sample

for i=1:nFrames
tic 
% i

% Read image
img = read(Obj, i);
if ~ismatrix(img)
img = rgb2gray(img);
end

% Set up some parameters for the first time
if i == 1

% Read ground truth location for first frame
locat = cell(1, npart);
for j=1:npart
load(annotations{j});
locat{j}=location; //显示这一行有错
end

函数式编程
浏览 530回答 2
2回答

墨色风雨

打错了吧,确实没有定交location这个变量啊。看代码的意思应该是写locat吧。

慕姐4208626

matlab中变量未定义:在命令窗口中输入的时候要调用函数QPSK_evm(s)
打开App,查看更多内容
随时随地看视频慕课网APP