Plot graph of polynomials
2 views (last 30 days)
Show older comments
Yash Raj Sitaram Prasad
on 9 Sep 2021
Answered: Yash Raj Sitaram Prasad
on 10 Sep 2021
I want to plot graph of polynomial function such as |x| and many more like this.
0 Comments
Accepted Answer
John D'Errico
on 9 Sep 2021
That is not a polynomial.
You have a sqrt root in there. And an absolute value. So learn how to use functions like abs, and sqrt. You will not learn unless you try.
help abs
help sqrt
First, you would you need to create such a function.
F = @(x) sqrt(abs(x));
Then to plot a function like that, you might read about fplot.
help fplot
So you might do this.
fplot(F)
0 Comments
More Answers (1)
See Also
Categories
Find more on Discrete Data Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!