asking for a polynomial expression in an input
Mostrar comentarios más antiguos
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.
Respuestas (1)
John D'Errico
el 2 de Mayo de 2023
Editada: John D'Errico
el 2 de Mayo de 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.
Categorías
Más información sobre Polynomials en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!