Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Plotting graph in C

  • 26-11-2008 02:24PM
    #1
    Registered Users, Registered Users 2 Posts: 1,890 ✭✭✭


    Hey guys
    I'm a first year engineering student and we're doing Computing for engineers module.
    It's pretty much just C

    Everyone in my class is stumped by a new assignment which we have been given.

    here it is :

    Plotting the Sine function

    Develop a program that displays on the screen a plot of the sine function over some specific interval.
    The sin function takes float values (radians) and returns values between -1.0 and 1.0. It is available by including the standard library <math.h> .

    The program should accept the interval end points from the user and the increment value. When testing your program try different ranges of input values and adjust the interval depending on the range entered.



    Display the output of the sin function along the x-axis and the angle on the y axis



    -1.0 0.0 1.0

    +
    +
    +

    0.0 * .

    *

    *

    *

    . *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *



    +
    +
    +

    -1.0 0.0 1.0


Comments

  • Registered Users, Registered Users 2 Posts: 1,890 ✭✭✭Effluo


    Those points are supposed to be in an "S"
    shape!


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Please read the rules regarding asking homework questions and try again.


This discussion has been closed.
Advertisement