01-04-2010 01:44 PM
I have an array of points (values) around 1000. I want to plot those values in different types of waveforms - triangle, sine, cosine etc.
How ca I do that? For the triangle waveform i was able to split my array into 2 equal halves and plot the first half and the secind half separatley to generate a triangle waveform. But how do I do it for Sine, Cosine, Sawtooth etc? It is an urgent issue. Prompt reply will be appreciated. Thanks
Solved! Go to Solution.
01-04-2010 01:53 PM
Hello,
If you are having array of sample data and if you just want to plot sine waveform and cosine waveform, you can use the "SINE & COSINE VI" present under mathematics pallete sub pallete Trigonometry,
OR
Goto signal processing pallete, signal generation subpallete, here you can find the sine waveform,triangle waveform generation and many more, VI input is a single sample at a time,
so use for loop in both the options.
Hope this gets to your required solution.
01-04-2010 02:01 PM
True. But I would have to read the values one by one from the array and then repopulate them into an array, right?
I was wondering if there is a mechanism through which could give my existing array as input at one go and get a sine waveform out of it?
01-04-2010 02:06 PM
The Sine function (and many others) have polymorphic inputs. Feed in an array of numbers and you get an array of the sines out. Try it!
Lynn
01-04-2010 02:10 PM
Hello,
The VI in mathematics pallete is a polymorphic, it accepts array input also,.
attached a VI for your reference,
VI generates 1000 randon numbers and plots the sine and cosine wave,
01-04-2010 02:18 PM
Oh yes.. my bad. I am new to LabVIEW and not proficient yet 🙂
Thank you very much, Lynn and cancancanopen. It works.