フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Plot not looking like equation should.

1 回表示 (過去 30 日間)
Lydia Haggard
Lydia Haggard 2020 年 10 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Here's the code I have:
plot([1,0,0,1,1],[0,0,1,1,0],'g'); hold on
for i = 1:1:39
a = ((i+1)/40);
b = ((40-i)/40);
plot([b,0],[0,a],'k')
end
And this is the output
I want the graph to look like this:
minus the colors.
Thanks

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 10 月 18 日
point (0,y) should be joined to point (C-y, 0) for some constant C
eg 0 1 to 5 0, 0 2 to 4 0, 0 3 to 3 0, 0 4 to 2 0, 0 5 to 1 0

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by