NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

labview中用mathscript节点定义function时出错

我想用mathscript节点定义一个函数,在后面的matlabscript节点中要用到这个函数,可是老出现错误。代码如下:

function area=t(a,b,c)
a=3.3;
b=4.4;
c=5.5;
s=1/(2*(a+b+c));
area=sqrt(s*(s-a)*(s-b)*(s-c))

运行箭头老师端开的,错误提示:

mathscript 节点:发生语法或者语义错误

unexpected token: function

期待您的回复。

 

下载全部
0 项奖励
1 条消息(共 2 条)
3,062 次查看
您好, 请参考下面的链接在Mathscript Windows中定义函数,然后再Mathscript Node中使用。http://digital.ni.com/public.nsf/allkb/82357F97D31EAAE2862570A5006183C4?OpenDocument
0 项奖励
2 条消息(共 2 条)
2,924 次查看