Plotting in a specific range

6 次查看(过去 30 天)
lets say i have this simple code:
Res=[];
for i=10:2:50
for t=1:1:3
y=i*t
Res=[Res; i t y ]
end
end
How can I plot i-y curve but only when i>20 ?

采纳的回答

Fangjun Jiang
Fangjun Jiang 2021-5-24
index=Res(:,1)>=20;
plot(Res(index,1),Res(index,3))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by