05-11-2011 12:29 PM
Hi all,
I'm looking to create a custom waveform in LabVIEW without having to create my data in Matlab. I know of MathScript, but I would rather not have to purchase that if it's not necessary.
Ideally I should be able to generate a 1D array of double precision data points from a function such as the following:
K=3;
fm=10^7;
fc1=K*fm;
Fc=100e3;
T=K/fc1;
fs=K*100e6/(T*Fc);
dt=1/fs;
t=[pi/2:dt:T+pi/2-dt];
f1=cos(2*pi*fc1*t);
f2=cos(pi*fm.*t+pi/4);
f=-f1.*f2;
This code was taken directly from Matlab. If you copy and paste it then plot it you will see the function that I am trying to create withing LabVIEW. This function is simply an AM cosine.
Thanks for the help,
Marc
05-11-2011 12:36 PM
Looking back, I may not have been clear on one point. I don't necessarily have to enter a function, I'm willing to program in LabVIEW and use some signal processing to obtain the same results.However, ultimately I would have to be able to modify the sample rate as I can in my Matlab program with dt.
05-11-2011 12:53 PM
That seems fairly straightforward. What are you having problems with?
05-13-2011 02:28 PM
Yep you're right, after some digging, I found the Formula Waveform VI. Exactly what I needed. Thanks.