필터 지우기
필터 지우기

how to use heaviside step function?

조회 수: 6 (최근 30일)
Juan Rosado
Juan Rosado 2012년 12월 4일
I want to plot two functions using heaviside command, but I can't find information about this on the MATLAB help option.
The command I want to use is found on this link,
http://www.mathworks.com/help/symbolic/heaviside.html
I would like to know how to incorporate this function to my MATLAB, and also is you may, I would like to know other ways to plot a step function without using the stairs command.
Thank you for your time.

채택된 답변

Chetan Rawal
Chetan Rawal 2012년 12월 4일
The function you are refering to is from the Symbolic Math toolbox. You need the Symbolic Math Toolbox along with MATLAB to run it:
For your question, you could simply work with numbers. eg: Following is an (almost) heaviside function plot:
x = [1 2 3 4 4.001 5 6 7 8 9 10];
y = [0 0 0 0 1 1 1 1 1 1 1];
plot(x,y);
axis([1 10 -1 2]);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematical Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by