Understanding and Plotting a Step Function: Expert Guidance and Tips

  • Thread starter Thread starter khurram usman
  • Start date Start date
  • Tags Tags
    Graph Plot
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 3K views
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
 
Physics news on Phys.org
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

  • Step.png
    Step.png
    5.7 KB · Views: 511
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}).