From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
x = -1:0.1:1;
A = {magic(3) 6.9 'string'};
a.day = 12;
foo
,定义在 foo.m
中,您必须键入foo(x)
FoO(x)
nargin
函数调用来确定提供了哪些输入参数,并赋值给缺少的参数。目前,并不支持nargin
和nargout
。去调用使用缺省值的函数,您必须去除调用nargin
和nargout
并始终提供所有的参数。因为目前没有办法去判定有多少输出参数是必需的,所以您应该计算所有的输出参数。return
关键字是不支持的,end
关键字在矩阵脚标指定中也是不支持的。return
关键字用来中断执行,并从在所定义的函数末尾之前的一个函数返回。一个LabVIEW 8 MathScript所不支持的一个用法是 function c = foo(a, b)
if a == 2
return;
end
c = 5;
return
的声明,设置这个标记变量为一特定值。放在核实标记变量值的if声明中原来return
声明的后面。end
关键字有问题的例子包括B = A(2:end)
B = C(2:end, 4)
A
是一维还是两维的。如果是一维的,你可以使用length
函数,替换成: B = A(2:length(A))
[m n] = size(A)
B = A(2:m*n)
[m n] = size(C)
B = C(2:m, 4)
A = rand(1000);
B = A(1:2:1000000);
foo
返回两个值,任何一个输出都不能直接放进某个矩阵的子元素。否则,将返回错误信息:“The current MathScript could not be executed. Please contact National Instruments with the script.”在LabVIEW 8 MathScript中不能工作的一个例子是[vs(m, n) s] = foo(...)
[a s] = foo(...)
vs(m, n) = a
|