How do i find x in an equation using the solve command?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Shimon Katzman
el 22 de Nov. de 2019
Respondida: Darshan Sen
el 22 de Nov. de 2019
Hi everyone,
I use MATLAB R2015a.
Can't solve a x in the matlab even for the simpliest equation like x-2=0. tryed everything.
thank you for your help.
1 comentario
Darshan Sen
el 22 de Nov. de 2019
Hello Shimon. What error are you getting? Do you have the Symbolic Math Toolbox add-on?
Here's a thread you might find useful. :)
Respuesta aceptada
Darshan Sen
el 22 de Nov. de 2019
Once you have the Symbolic Math Toolbox add-on, you may solve the equation like this
syms x
eqn = x - 2 == 0;
solx = solve(eqn, x)
Hope this helps. :)
0 comentarios
Más respuestas (1)
Erivelton Gualter
el 22 de Nov. de 2019
Do you have Symbolic Math Toolbox?
Try the following:
syms x
fcn = x-2;
solve(fcn == 0)
0 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!