how to print (function of x) in matlab ?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to print out the function I entered, for example I entered y=x.^4;
I want the matlab to calculate it and print it to me in term of x.
y=2x + 3x.^2 + ...
how can I do that ?
2 commentaires
Image Analyst
le 16 Nov 2018
How are you deriving that quadratic equation from the 4th order equation?
Why can't you just use input() to get the string and use fprintf() to "print out the function I entered"?
userResponse = input('Enter the formula : ', 's');
fprintf('%s\n', userResponse);
See
Enter the formula : y = x^4
y = x^4
Réponses (1)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!