i want to write code for a question

 Respuesta aceptada

Ameer Hamza
Ameer Hamza el 27 de Sept. de 2020
Editada: Ameer Hamza el 27 de Sept. de 2020
Although this equation is linear is x, and you can write the equation of x. For a general case, you can use fsolve()
c = 0.0038416;
f = @(x) c - 0.1*(x-sqrt(c/2));
x = fsolve(f, 0);
If you have the symbolic toolbox
syms x
c = 0.0038416;
eq = c == 0.1*(x-sqrt(c/2));
x = double(solve(eq))

2 comentarios

Walter Roberson
Walter Roberson el 27 de Sept. de 2020
I think you missed the sqrt() in the symbolic part?
Ameer Hamza
Ameer Hamza el 27 de Sept. de 2020
Thanks for pointing out. OP kept changing the question initially, so I forgot to make the change in the symbolic part.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Preguntada:

el 27 de Sept. de 2020

Comentada:

el 27 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by