필터 지우기
필터 지우기

how to plot a unit step function

조회 수: 6 (최근 30일)
Aaron Connell
Aaron Connell 2016년 11월 27일
답변: Daniel kiracofe 2016년 11월 27일

Below shows my convolution of two signals by hand. I want to know how to use MATLAB to plot y(t). Please and thank you. It is a unit step function.

채택된 답변

Daniel kiracofe
Daniel kiracofe 2016년 11월 27일
Do you want to do this numerically or symbollically?
With the symbolic math toolbox, the heaviside() function is a unit step. https://www.mathworks.com/help/symbolic/heaviside.html
If you want to do it numerically, you'll need to create it yourself, but it's easy. First create a time vector. e.g. t=-2:0.001:2 then create a zero vector for u, and fill in as appropriate: u = zeros(1,length(t)); u(find(t>0)) = 1; As u here is a vector not a function, you'd have to create a separate vector for the shifted step u(t-1).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by