Entering a formula by user

Is there a function which allows me to ask for a formula, while the prgram is beeing used, and subsequently use that formula?

 Respuesta aceptada

Nirmal
Nirmal el 25 de Jul. de 2012

0 votos

aMatrix = magic(5);
expression = input('Enter the name of a matrix: ','s');
if (exist(expression,'var'))
mesh(eval(expression))
end

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 25 de Jul. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by