LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

x(t)=sin (wt)

Solved!
Go to solution

Any tips on how I can model this without using the sine wave function and using the sine math function instead and output it using the waveform chart? I know the sine function takes input in radians so I was trying to convert to radians and then add a phase shift. any help would be much appreciated

0 Kudos
Message 1 of 3
(2,443 Views)

Shouldn't that be 2*pi/frequency*t? I think it's wt+p, and t=1/f? Not sure, it's been a while.

 

Also, you're using "i" as time, but it probably needs scaling (for instance t=i/1024, if you want i=1024 to be a full phase.

Message 2 of 3
(2,432 Views)
Solution
Accepted by topic author bmryner

 

you're close

1) It looks like you are converting the units incorrectly. To go from degrees to radians, it should be x* pi/180. It looks like you have it as 180/pi

 

2) You're stepping time (t) by the for loop index. That increments by 1 so your time step is once per second. Too slow. Step it by something smaller like i*dt (at least at the Nyquist Rate).

 

sin(wt_phi).png

 

Message 3 of 3
(2,404 Views)