01-07-2010 10:07 PM
01-08-2010 04:14 PM
Can you please be a little more specific about what you are doing and what behavior you are seeing? I opened the zip file and looked at the m file and VI, but the controls and indicators are very expressive. Also, is the attached m file your comparison file or is there another file to which you are comparing your Mathscript VI? What is the difference in the output?
Nick Keel
Applications Engineering
National Instruments
02-12-2010 09:28 AM
I got some difference beetween labview (v. 8.2) MathScript Node and Matlab (v.7.1.0.246 (R14) Service Pack 3) too. Im using the filtfilt function and get edge effects in LabView and not Matlab. You can see this problem in my screenshot below. Nothing fancy but how does LabView run the matlab code? Isnt using Matlab at all? I also post a plot with the filtered signal (y) from filtfilt in Matlab (red) vs and MatchScript Node (blue) and they are a bit diffrent in the noisy part.
02-15-2010 10:35 AM
Hi Tudor,
That looks like it may be an issue with the way the waveform graph indicators display values. If you look at the array data numerics, are there different values at the edges? I think the values may be the same, but the waveform graph may just connect to zero at the edges. One other problem may come from indexing, and the fact that Matlab indexes at one while LabVIEW indexes at 0. Does the data come with any inherent indexing information?
Nick Keel
Applications Engineering
National Instruments
02-18-2010 10:46 AM
02-18-2010 11:10 AM
Hi all,
I have noticed these edge effect before in MatLab Vs LabVIEW. Going back a few years mind. I think there were a couple of issues. One being that i think NaN was handled differently in my use case and also the type of zero order hold vs First order hold that matlab and LV do is different I believe i got around my problem by using a first order hold on my data set before passing it to the filter functions within LV.
Craig
02-22-2010 11:13 AM