Hi,
I can not access Matlab. So I just try your code in MathScript. The attached snapshot should work although it returns NaN result.
I add 'global L1 L2 L3 L4 L5 L6' at the beginning of the matlab script node and it works well.
Everything is OK.
Thank you so much.
针对matlabscript问题,有几点要说明:
1、用这个去调用matlab的程序是不稳定的。尽量少用。如果用的时候报错了,就一定要把所有相关程序都关闭,然后重新打开再调试。不要盲目使劲调试。因为编译错误后后台有个程序始终悬挂着,不关闭再改前台的程序也没用;
2、调用含有子函数的.m程序,使用mathscript是可以的。只需要把主函数也写成一个可调用的函数就可以。记住要把输入输出参数设置好。然后用mathscript。
不理解的可联系我:http://wrjifeng.zw78.com/