asking for a polynomial expression in an input
Afficher commentaires plus anciens
I am building a calculator app for an assignment, and got stuck on the fact that the equation I am calculating evaluates the gradient of the inputs. when the inputs are constant the gradent is 0 (obviously). For the calculator to work I would like the user to be able to input a polynomial expression. Any help or hints are apprecited, I am very stuck and confused.
Réponses (1)
John D'Errico
le 2 Mai 2023
Modifié(e) : John D'Errico
le 2 Mai 2023
Can you type in a polynomial? Why not? You type it anyway. Just use input, which can return the result as a string. Or, use a dialog box.
help input
help inputdlg
Next, how can you convert the string into a symbolix expression?
help str2sym
Learn to use the tools in MATLAB. They are there.
Catégories
En savoir plus sur Polynomials 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!