I need to repeat two signals combined periodically as a single curve in matlab
1 次查看(过去 30 天)
显示 更早的评论
Hi Friends
I want to get a graph of y vs t. This graph should have pattern in the form of a sine wave and straight line pattern connected periodically. Example, from t=0 to t=5 curve pattern is sine wave then from t=5 to t=10 pattern is is straight line then from t=10 to t=15 pattern is sine wave and from t=15 to t=20 pattern is a straight line and so on.
I want to plot that graph of such pattern in Matlab using m-file or using simuling block.
Someone Please help.Its urgent
0 个评论
采纳的回答
sixwwwwww
2013-12-6
you can do something like this:
for i = 0:4 * pi:16 * pi
t1 = linspace(i, i + 2 * pi, 100);
y1 = sin(t1);
t2 = linspace(i + 2 * pi, i + 4 * pi, 100);
y2 = zeros(1, numel(t2));
plot(t1, y1, t2, y2), hold on
end
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!