How to ask user to input an equation (could be mulitvariable)

I am setting up a matlab code that asks for input of an equation from the user to minimize. This equation could be a multivariable equation (x,y,z..). so far I have equation= input('Enter an equation to minimize: ','s');
Eventually we will take the gradient and hessian.

2 commentaires

So what is the problem? you ask user to input equation and write it to your string. After that you must decode this equation.
As Mikhail said, set the input option from the user as a string and then decode the equation based on the variables for your input equation.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Centre d'aide et File Exchange

Question posée :

le 12 Nov 2014

Commenté :

le 12 Nov 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by