Solving an equation with one variable
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Venkatesh Tanikonda
am 23 Okt. 2019
Beantwortet: Star Strider
am 23 Okt. 2019
How can I solve :
(q*a^4/(E*t^4)) = k1*y/t + k2*(y/t)^3;
q,a,t,E,k1,k2 are constants; where as y is the variable.
How to write matlab code to solve this in terms of y.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 23 Okt. 2019
One approach:
Out = fzero(@(y) (q*a^4/(E*t^4)) - k1*y/t + k2*(y/t)^3, 2)
That assumes that all ‘constants’ are scalars. Choose the initial estimate (here 2) that best approximates the value for ‘y’ that you want to find.
0 Kommentare
Weitere Antworten (1)
Andrei Bobrov
am 23 Okt. 2019
syms q a t E k1 k2 y
eq = (q*a^4/(E*t^4)) == k1*y/t + k2*(y/t)^3;
sol = solve(eq,y,'MaxDegree', 3);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!