How can I export a waveform plot to .csv or .wfm?
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to generate and combine two arbitrary waveforms with some added amount of random noise, then export that to a file which will be used in my Labview vi.
Is there a way to export the waveform to a .csv or .wfm?
Example code
%Set parameters
timeStep = 0.001;
time = 0:timeStep:(1-timeStep);
amplitude1 = 0.4;
frequency1 = 8;
amplitude2 = 0.7;
frequency2 = 14;
waveform1 = amplitude1*sin(2*pi*frequency1*time);
waveform2 = amplitude2*sin(2*pi*frequency2*time);
%Add waveform1 + waveform2
waveform = waveform1 + waveform2
%Add noise
waveform = waveform + 0.3*rand(1,size(waveform,2));
waveformArray = (waveform./max(waveform))';
plot(waveformArray);
xlabel('Samples');
ylabel('Amplitude');
0 Kommentare
Antworten (1)
Cris LaPierre
am 4 Jan. 2021
Does it need to be is any particular format for LabView to use it? If not, there are many ways you can save it.
0 Kommentare
Siehe auch
Kategorien
Mehr zu LabVIEW finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!