11-30-2009 10:10 AM
Hi
I keep getting error 1050 when Labview tries to load a text file through the matlab script node.
I've all ready checked for it on google and this forum but found nothing. I've also done this: http://digital.ni.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53 and tried to use dlmread and more.
The thing is that I need the matlab script node to read a txt file that Labview made from a chart with only 1 array, plot it and export a jpg image. I can't really use the 'export image' or 'get image' function in Labview cause I need the whole plotted chart (these functions only take a snap shot of it when they're run).
This is my code that I'm using:
data=load('file') ;
Vpp=(data(1:2000,1));
xsize = (1/2000);
plot(0.0005:0.0005:1,Vpp);
axis([0 1 -5 5]);
print('-djpeg', 'graph.jpg');
The usual load in matlab to load txt files and print to print the jpeg. The code works in matlab but not in labview 🙂
And yeah, I'm using windows 7 and legal versions of matlab r2009b and Labview 2009 😉
Solved! Go to Solution.
11-30-2009 10:17 AM
11-30-2009 11:02 AM
Hehe, I've figured it out 😛
Path must be converted to String and skip the ' around the file.
Worked 🙂
11-30-2009 11:03 AM - edited 11-30-2009 11:05 AM