Graph Doesn't Plot Piecewise Function

syms x;
f = piecewise(x <= 1, ((-2.*(x.^2))+9.*x-7), x > 1, (10.*(x^(1./2))+3));
fplot(x,y,[-4 5]);
This code should run, i dont get whats wrong with it. I would really appreciate your help. it gives the following errors:
Error using fplot (line 149)
Invalid parameter '-5.9325...'.
Error in assignment1 (line 3)
fplot(x,y,[-4 5]);

回答 (1 件)

Ali Ahmed
Ali Ahmed 2022 年 10 月 9 日

0 投票

Nvm i solved it

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

質問済み:

2022 年 10 月 9 日

回答済み:

2022 年 10 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by