ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Transfering Matrices from MATLAB to LabVIEW

Hello Everyone,

 

I have just started working in LabVIEW. I need to make an interface between MATLAB and LabVIEW.

 

I want to calculate new matrices and vectors everytime in MATLAB and pass those to LabVIEW for QP-optimization.

 

My MATLAB script node looks like the following :

 

for i =1:x
for j=1:y
 a(i,j) = i+j;

end
end

 

where x and y are control inputs from Front Panel and "a" matrix is need to be used in LabVIEW.

 

When I am running this, an error occurs as :

 

"Code 1050

 

LabVIEW:  Error occurred while executing script. Error message from server: ??? Error: Unexpected MATLAB operator.

. in MATLAB_Script.vi"

 

I have the required .dll files in the required folder and also the destination directory, the MATLAB wants to open, I have set it to same.

 

I do not know why is this error is coming.

 

However, when I am doing simply "a=x+y" the code runs properly. So, I doubt if the matrix and vector tranfer need any special syntax.

 

Please help.

 

Thanks

Prashant

 

0 Kudos
Message 1 of 1
(2,481 Views)