How do I plot the step function f(t)=n when n+1>t>n>0?

  • Thread starter khurram usman
  • Start date
  • Tags Tags
    Graph Plot
3 replies · 3K views · last reply
khurram usman
Messages
86
Reaction score
0
i have been given a function to plot. but i don't 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 don't know how to write it here.
please explain the function to me and also help me to plot its graph
 
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.
Ex.3.9999
[3.9999]=GIF(3.9999)=3
Ex.4=[4.0000]=GIF(4.0000)=4
 
Attachments
  • Staircase graph of a step function on x and y axes from -4 to 4, with horizontal steps at integer heights rising from -4 to 4 as x increases.
    Step.png
    5.7 KB · Views: 524
1994Bhaskar said:
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.
Ex.3.9999
[3.9999]=GIF(3.9999)=3
Ex.4=[4.0000]=GIF(4.0000)=4

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 won't be defined then.

also how can i plot functions as this or any other complex function in programs such as microsoft math or mathematica?
 
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}).