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

Labview crashes when Matlab output is array

已解决!
转到解答

Hi,

 

I'm struggling for a while with Matlab script and arrays. When I use arrays for outputs Labview crashes without any error message. I have attached a sample VI which crashes. Can someone tell me how to fix this? I need a Matlab script that can return 1D arrays.

0 项奖励
1 条消息(共 4 条)
1,471 次查看

I'm attaching another VI which doesn't work and crashes Labview. I don't understand what I'm doing wrong?

0 项奖励
2 条消息(共 4 条)
1,450 次查看

It's likely the same thing I mentioned here:

https://forums.ni.com/t5/LabVIEW/labview-crashed-when-attempting-to-send-array-to-matlab-program/m-p...

Some form of mismatch of the array dimensions (1D vs 2D) and the data type itself. Matlab is probably creating a 2d array in this case.

0 项奖励
3 条消息(共 4 条)
1,448 次查看
解答
接受人 walchu

This post helped me solve the problem: Solved: Re: Using array as a MATLAB script input in a subVI - labview crashes - Page 2 - NI Communit...

 

I replaced MATLAB script node with MATLAB function and the error dissapeared.

0 项奖励
4 条消息(共 4 条)
1,376 次查看