i want to write code for a question
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
rakesh kumar
il 27 Set 2020
Commentato: Ameer Hamza
il 27 Set 2020
c=0.1(x-y)
x=4:0.01:12
y=sqrt(c/2)
i have to find the value of x for which c=.0038416
0 Commenti
Risposta accettata
Ameer Hamza
il 27 Set 2020
Modificato: Ameer Hamza
il 27 Set 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 Commenti
Ameer Hamza
il 27 Set 2020
Thanks for pointing out. OP kept changing the question initially, so I forgot to make the change in the symbolic part.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!