how to right math functions

조회 수: 12 (최근 30일)
Abdulelah AlQahtani
Abdulelah AlQahtani 2023년 5월 8일
답변: Sam Chak 2023년 5월 8일
how can I define u(t) for the domain of t. To put in in M-file
  댓글 수: 2
Torsten
Torsten 2023년 5월 8일
u or u' ?
Abdulelah AlQahtani
Abdulelah AlQahtani 2023년 5월 8일
u'

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

답변 (2개)

Torsten
Torsten 2023년 5월 8일
편집: Torsten 2023년 5월 8일
us = @(t) 4*(t>=0 & t<5) + 2*(t>=5);
t = -10:0.1:10;
plot(t,us(t),'r')

Sam Chak
Sam Chak 2023년 5월 8일
For simplicity, the signal can be defined like this.
t = linspace(-5, 10, 15001);
u1 = 0*(t <= 0);
u2 = 4*(t > 0 & t <= 5);
u3 = 2*(t > 5);
u = u1 + u2 + u3;
plot(t, u), grid on, ylim([-0.5 4.5])

카테고리

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