Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Plotting graph in C

Options
  • 26-11-2008 2:24pm
    #1
    Registered Users 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 Posts: 1,890 ✭✭✭Effluo


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


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


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


This discussion has been closed.
Advertisement