昨天看到大家回复我,特别感动,今天还有个问题,为什么我按照help文档里面的程序粘贴到命令窗口里面之后,居然运行错误,为什么?
>> for n = 1:100
A = rand(n,n);
b = rand(n,1);
tic;
x = A\b;
t(n) = toc;
end
plot(t)
这是运行的错误
??? Error using ==> toc
You must call TIC before calling TOC.
when copy/paste fail, the first thing you should do is to try keyboard input.
some time help page contain some illegal characters,
if you just simply copy/paste, matlab won't recognize them.