필터 지우기
필터 지우기

HI, i want to plot x=sin(t*pi) fuction like this picture for t[0:1:24] and x will be 0 when t=17

조회 수: 4 (최근 30일)

채택된 답변

Joseph Cheng
Joseph Cheng 2015년 6월 4일
편집: Joseph Cheng 2015년 6월 4일
figure out what azzi was doing in the math which would lead you to figure out what to change.
t=0:0.01:24
y=sin(t*pi).*(t<15) + 3*sin(t*pi).*(t>=15)
plot(t,y)

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 4일
t=0:0.01:24
y=sin(t*pi).*(t<17)
plot(t,y)
  댓글 수: 1
Image Analyst
Image Analyst 2015년 6월 5일
david's two "Answers" moved here: because they are comments (replies) to Azzi and not "Answers" to his original question at the top of the page.
thank you Mr.AZZI i'm really satisfied with your answer so if I want to change the amplitude at t = 15 like this picture
y=sin(t*pi) for 0<t<15
y=3*sin(t*pi) for t>15
thank you very much . my last question is if i want to change the amplitude of sinus 7 times 0<t<38
first for 0<t<10 y= sin(t*pi)
and for 10<t<15 y=2*sin(t*pi)
and for 15<t<19 y=5*sin(t*pi)
and for 19<t<24 y=sin(t*pi)
and for 24<t<27 y=0
and for 27<t<35 y=4*sin(t*pi)
and for 35<t<38 y=0

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

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by