Solution of 1 equation with 2 unknown variables

3 visualizaciones (últimos 30 días)
Sachin Bharadwaj M
Sachin Bharadwaj M el 26 de Nov. de 2020
Comentada: Ameer Hamza el 26 de Nov. de 2020
How to find the solution of the equation using MATLAB?
[ In words, cos hyperbolic of x divided by cos hyperbolic of y is equal to 1 divided by 2 ]

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 26 de Nov. de 2020
Editada: Ameer Hamza el 26 de Nov. de 2020
A single equation with two variable can have an infinite number of solutions. You need to fix atleast one value. For example
y = 1.5;
x = acosh(cosh(y)*1/2)
In this case you have an expression for the solution of 'x' in term of 'y'. In general case, you can use fzero() or fsolve()
y = 1.5;
fzero(@(x) cosh(x)/cosh(y)-1/2, rand())
  2 comentarios
Sachin Bharadwaj M
Sachin Bharadwaj M el 26 de Nov. de 2020
Thank you Ameer !
Ameer Hamza
Ameer Hamza el 26 de Nov. de 2020
I am glad to be of help!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by