Graph Doesn't Plot Piecewise Function

조회 수: 20 (최근 30일)
Ali Ahmed
Ali Ahmed 2022년 10월 9일
답변: Ali Ahmed 2022년 10월 9일
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일
Nvm i solved it

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by