Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Plotting after a for loop
1 回表示 (過去 30 日間)
古いコメントを表示
I'm having trouble plotting the graph in the picture. I've been trying with and without the for loop in the code but i have no idea what i'm doing wrong. please help :(
for x =[-5:5];
if x < 0 ;
y = 0
else if x >= 0 ;
y = 0.5
end
end
end
plot(x,y)
hold on
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!