Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Help needed to plot a graph

  1. Sep 22, 2011 #1
    i have been given a function to plot. but i dont understand the function.
    the function is:
    f(t)= n when n+1>t>n>0
    f(t)= 0 everywhere else

    actually its a step function. i dont know how to write it here.
    please explain the function to me and also help me to plot its graph
  2. jcsd
  3. Sep 22, 2011 #2
    The attachment shows the graph using Microsoft Maths.Step function is also known as Greatest Integer Function(GIF).In GIF you only take integral part of that number.
    Ex. No. is 2.348947 Here GIF of this(also represented as [2.348947]=2 known informally as box function-same as GIF) is 2.

    Attached Files:

  4. Sep 22, 2011 #3
    ok i saw the graph.the graph that i had in mind was nearly the same except that i didnt have the vertical lines in mine.where did those come from. i mean the function wont be defined then.

    also how can i plot functions as this or any other complex function in programs such as microsoft math or mathematica?
  5. Sep 23, 2011 #4
    Those lines are just drawn for sake of our convenience, to show connection between two very close numbers.You are right they don't exist there.

    You will also get such lines for Fractional Part of x ({x}).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook