How to plot something like this??

조회 수: 12 (최근 30일)
Daniel Schilling
Daniel Schilling 2018년 11월 5일
댓글: madhan ravi 2018년 11월 5일
x = 0.6*(u(t+2)-(cos(pi*t)+1)*(u(t+1)-u(t-1))-u(t-2))
t = -5:51:5
plot(x,t)
When running this i get that u is an undefined variable. U in this case is a shifted step function however which is bounding my cos function. What am I missing here?

채택된 답변

madhan ravi
madhan ravi 2018년 11월 5일
  댓글 수: 2
Daniel Schilling
Daniel Schilling 2018년 11월 5일
Ok fair. I realized after I posted this I had to define the piecewise function for the step. Now my question is, using the example you provided, I'm being told piecewise is an undefined function. Is that not built in?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by