I'm attaching another VI which doesn't work and crashes Labview. I don't understand what I'm doing wrong?
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.
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.