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

Efficeint calling of MATLAB scripts that call subfunctions

I am looking to call some MATLAB code using the MATLAB Script Node in LabVIEW. The problem is I cannot get the script to call subfunctions. Specifically, I want to use the "fmincon" function for a constrained optimization problem. I can write the objective function inline, however the nonlinear constraints need to be specified as a function .m file. This does not seem to execute correctly (or at all) using the MATLAB script node from LabVIEW. I also understand that I can call MATLAB using the System Exec .vi, however, how would I input/output the information without reading/writing text files? This seems ungainly. Compilation into a DLL may be possible, but I am unfimilar with the process and do not have m
uch time to work on this. Is there a way I can get subfunctions to execute? Thanks.
0 项奖励
1 条消息(共 4 条)
3,613 次查看
Hi

I never encountered this kind of problem with Mathlab.

Maybe you should try to redefine the path of your .m file.

Doc-Doc
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 项奖励
2 条消息(共 4 条)
3,613 次查看
Thanks, all this thrashing around and I completely forgot to change the MATLAB root directory to access my subfunctions.
0 项奖励
3 条消息(共 4 条)
3,614 次查看
What did you change your root directory to?
I'm trying to load some .mat files from the script node and having very little success.
The files are in my C:\MATLAB6p1\work directory.
I wonder where the script node looks by default when building a VI...
I have seen that executables can specify a directory during the build process, but
any help would be useful at this point.
0 项奖励
4 条消息(共 4 条)
3,517 次查看