How to plot a piecewise function for single cycle? Then repeat the same graph for several times.
이전 댓글 표시
How to plot a piecewise function for single cycle? Then repeat the same graph for several times.
댓글 수: 2
Walter Roberson
2017년 2월 25일
Symbolic or numeric?
António Gil
2020년 10월 13일
How would you do a Symbolic one?
답변 (1개)
Asad (Mehrzad) Khoddam
2020년 10월 13일
This is a sample of function that repeats the graph:
% initial x
x0=-1;
% period
T=4;
xp=linspace(x0,x0+T,201);
% function
yp=sin(sqrt(2+xp));
x=[];
y=[];
% repeat it
for i=-3:2
x=[x xp+T*i];
y=[y yp];
end
plot(x,y)
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!