06-12-2023 08:05 AM
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.
Solved! Go to Solution.
06-12-2023 08:37 AM
I'm attaching another VI which doesn't work and crashes Labview. I don't understand what I'm doing wrong?
06-12-2023 08:38 AM
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.
06-15-2023 03:29 AM
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.