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
5 次查看(过去 30 天)
显示 更早的评论
采纳的回答
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)
0 个评论
更多回答(1 个)
Azzi Abdelmalek
2015-6-4
t=0:0.01:24
y=sin(t*pi).*(t<17)
plot(t,y)
1 个评论
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 Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!