Error using function fplot
Afficher commentaires plus anciens
When typing my code, I keep getting the error of invalid parameter from fplot. Not sure why it keeps coming up. How would I fix this?
Code:
syms x
f(x) = log(x)^4 * exp((-x)^3) * x^2;
val = int(f(x),x,[0,Inf]);
vpa(val)
X = [0.5 : 0.1 : 2.5]
fplot(@(x) f(x),X,'b')
1 commentaire
Geoff Hayes
le 11 Mai 2020
Garrett - what happens if you don't use a symbolic expression? From fplot 'f' input parameter, the first parameter is a function handle. Or, perhaps you can convert the f to a MATLAB function handle with matlabfunction.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Calculus dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

