c=[1 -12 24 -48]
croots=roots(c)
Use the if - elseif construct to plot the 1st root as follows: if
the root is less than 3 or greater than 5, plot the root as red + with
size 32; if the root is greater than 3 and less than 5, plot the root
as a blue square size 32.

1 件のコメント

madhan ravi
madhan ravi 2019 年 3 月 6 日
Please show what you have tried for your homework.

サインインしてコメントする。

 採用された回答

KSSV
KSSV 2019 年 3 月 6 日

0 投票

Check the demo example.
figure
hold on
for i = 1:10
x = rand ;
if x < 0.5
plot(i,x,'*r')
else
plot(i,x,'*b')
end
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

質問済み:

2019 年 3 月 6 日

コメント済み:

2019 年 3 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by