Entering a formula by user

1 Ansicht (letzte 30 Tage)
Karel
Karel am 25 Jul. 2012
Is there a function which allows me to ask for a formula, while the prgram is beeing used, and subsequently use that formula?

Akzeptierte Antwort

Nirmal
Nirmal am 25 Jul. 2012
aMatrix = magic(5);
expression = input('Enter the name of a matrix: ','s');
if (exist(expression,'var'))
mesh(eval(expression))
end
  1 Kommentar
Karel
Karel am 25 Jul. 2012
thanks, yust what i needed

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by