【发布时间】:2015-03-07 19:24:59
【问题描述】:
我刚开始使用Scilab,我正在尝试运行下面的代码,但是当我尝试时它一直向我显示此错误::
test3(1000) //Line that I type to run the code
!--error 4 //First error
Undefined variable: cputime
at line 2 of function test3 called by:
我使用MATLAB 运行它,它工作正常,但我不知道如何使用 Scilab 让它运行。
有关使用 Scilab 编辑器键入时的示例代码,请参见下文。
function test3(n)
t = cputime;
for (j = 1:n)
x(j) = sin(j);
end
disp(cputime - t);
【问题讨论】:
标签: scilab