LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

matlab labview

hi
i am a new Labview user
i try to run a working function that i wrote in matlab on labview and i get error 1048
can u help me solve this problem ?
ty
 
0 Kudos
Message 1 of 4
(2,828 Views)
If you were to have done a search on this board or on the overall NI site you would have encountered numerous posts regarding this error. This error is typically caused by using a variable name that is a reserved word in Matlab. I'm not a Matlab expert, but my 30 seconds of checking on the Mathworks web site showed that "ty" seems to be a reserved word for the makehgtform function, though I may be wrong in this. Also, "Load1" needs to be defined as to where this function is located. Is the .m file in the working directory used by Matlab? If not, you will need to set the working directory to point to wherever that function is located.
0 Kudos
Message 2 of 4
(2,803 Views)

hi

i have tried to chenge the variables, but it didnt help

i have notice that when i try to lanch reserve matlab function as "ones(1,5)" it's work fine

but when i chenge it back to Load1 it fails

 the m.file is located in the directory used by matlab so this isnt the problem

where i need to put the m.file in order that matlab will call it from labview?

ty

0 Kudos
Message 3 of 4
(2,766 Views)
To me that indicates that it's not finding your function. Try adding a "cd" statement that explicitly sets the working directory prior to calling your function.
0 Kudos
Message 4 of 4
(2,748 Views)