04-13-2022 10:16 AM
Hi,
I have been trying to create a user interface where the user enters values for variables. These variables are then transferred into a MATLAB Script Node and the Matlab Script creates 4 XY plots and is meant to display them in one XY graph, however an error appears and I am not sure what it means as I am a complete novice in Labview. The MATLAB Scripts works perfectly on MATLAB.
Can someone please help me correct my file?
04-13-2022 11:46 AM
Can you "save for previous". many don't have LabVIEW 2021 yet.
Not sure why you would need Matlab script to create data for a graph? Seems like a crazy detour!
04-13-2022 06:08 PM
Because the plots calculated are solved by differential equations and we’re easier to plot on Matlab which I have experience using. Also, as I said, I am a complete novice to LabVIEW so I didn’t know how to approach this.
04-13-2022 06:18 PM
2015 version
04-13-2022 06:30 PM
What is the error you are getting? What the error code? (I am only getting a Matlab error because I don't have Matlab on the current computer). Also, a proper UI probably needs a toplevel loop with a defined rate.
(Obviously, there are some glaring inconsistencies with datatypes. Why are some of the inputs defined as complex datatype? (look for the red coercion dots). I have a hard time imagining what e.g. a complex temperature would mean. 😄 )
04-13-2022 06:34 PM
Error 1050.
What should the data types be? I don’t know what the differences are.
04-13-2022 07:25 PM
I have worked out one error - in the bottom Matlab script. Clearly these won't work in Matlab either.
You have this Matlab Code:
a = zeros(73,1) ;
b = zeros(73,1) ;
x = zeros(73,1);
z = zeros(73,1) ;
Y(:,1) = a;
Y(:,2) = x;
Y(:,3) = b;
Y(:,4) = z;
The last 4 assignments are reversed (and are causing one of the errors.
I would suggest trying these out again in Matlab, supplying the necessary parameters. Unfortunately we do not get told where the error is inside the Matlab script, only that there is an error.
04-13-2022 08:07 PM - edited 04-13-2022 08:11 PM
All your errors are Matlab script related and come from Matlab, not LabVIEW: