Solving for theta at different time steps
Mostra commenti meno recenti
I have the following equation:
47.9618*theta + 15.9809*sin(2*theta) = 20.780136*t
Given, at time t = 0, theta = 0 radians. I want to find theta value at t = 1 second, 2 seconds, etc.
Could this be automated on matlab?
Risposta accettata
Più risposte (1)
Walter Roberson
il 5 Lug 2017
Modificato: Walter Roberson
il 5 Lug 2017
There is no closed form solution for that. Use fzero or fsolve:
eqn = @(theta,t) 47.9618*theta + 15.9809*sin(2*theta) - 20.780136*t;
for t = 1 : 5
theta0 = randn()
fzero( @(theta) eqn(theta,t), theta0)
end
Categorie
Scopri di più su Functions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!