06-23-2008 09:13 AM
06-23-2008 09:37 AM
06-23-2008 09:54 AM
but for some reason, labview won't open my matlab progam...
for example if my matlab script says this
x=input('what is x?')
y=input('what is y?')
z=x+y
and i want to display what z is; so i right click on the script node and add an output which is z and create an indicator. when i run the program, it doesn't work.
i would have to delete the first 2 lines of my matlab code; and right click on the script node and add input; twice one for x and one for y.
would you know how to make it so that i could just have it run the code without inputting in labview??
06-23-2008 10:43 AM - edited 06-23-2008 10:43 AM


06-23-2008
11:09 AM
- last edited on
10-30-2026
05:40 PM
by
Content Cleaner

Message Edited by altenbach on 06-23-2008 09:10 AM
06-23-2008 11:19 AM
06-23-2008 12:04 PM
hey smercurio,
i see what you are saying with the decalring the variables but that screen doesn't even pop up when i run my code. i get an error 1048, it says Labview failed to get variable from the script server. do you know how to fix this?
06-23-2008
12:34 PM
- last edited on
10-30-2026
05:50 PM
by
Content Cleaner
There are a number of reasons why you can get error code 1048: Why Does My Script Written in The MathWorks, Inc. MATLAB® Language Syntax Return Error 1048?
Do the Matlab examples that ship with LabVIEW work? Here's what I did, and as you can see it work, though it's not pretty:
That said, you should reconsider using Mathscript.
Also, what are you fundamentally trying to accomplish? Is this part of something bigger?
Message Edited by smercurio_fc on 06-23-2008 12:34 PM