Sine graph in degrees


1 comment

  • Support Admin

    It depends on how you would like to create the graph.


    If plotting the sine wave from script (as outlined in Plotting Equations), you can create a for-loop where the x-axis is in a range that makes sense in degrees (e.g. 0 to 360), then convert the x values to radians before calculating the sine. E.g. 

    for xDeg = 0, 360 do
    ySine = math.sin(math.rad(xDeg))
    plotName.seriesName:Add(xDeg, ySine)


    If plotting the sine wave from simulation, change the frequency of the sine wave to 1/360. If using this method I recommend running the simulation asynchronously, as it would take 360 seconds to run only one period of the sine wave (which is a little long for users).

    Comment actions Permalink

Please sign in to leave a comment.