input equation from user
Ältere Kommentare anzeigen
Hi, I am a new user for MATLAB and I have R2010a version. I want to write a program where user should be able to enter euqation as input. e.g. : 5x^2 + 2x =8. And once the equation is fed in, I want to find out value of the equation for a perticular x value.
Please help.
Akzeptierte Antwort
Weitere Antworten (2)
Manjeet Singh
am 5 Apr. 2016
Bearbeitet: Stephen23
am 24 Jun. 2016
str = input('Give an equation in x and y: ','s'); % the user types equation in form of x and y
f = inline(str,'x','y') % This gives function in form of f(x,y) $ both value of x and y can be put like f(2,3)
1 Kommentar
Sourin Dey
am 24 Jun. 2016
Can you kindly show me the way to read the coefficients from the input equation? (The equation will be taken using input function)
Mohammed Alrajeb
am 9 Aug. 2019
0 Stimmen
hi every one
i need to your help
i need to enter 4 input (decimal number) and convert to binary number 32bit how can do that?
Kategorien
Mehr zu Variables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!