Plot cells with variables?
3 views (last 30 days)
Show older comments
Sa Moha on 8 Dec 2021
Answered: Awais Saeed on 9 Dec 2021
I want to plot cells of a matrix. For example;
But it returns error for me.
Error using plot
A numeric or double convertible argument is expected
Can you please help?
Awais Saeed on 9 Dec 2021
I think you want to plot the symbolic expression x^2+1 (that's what A(2,1) gives you). If that's the case, use fplot()
A = [0;1;0;1];
A = A*x^2+A
fplot(A(2,1)) % its default interval is [-5 5].
title('plot of X^2+1')
More Answers (0)
Find more on Graphics 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!