Plotting a non linear equation.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sudhir Sahoo
le 14 Avr 2021
Commenté : Sudhir Sahoo
le 19 Avr 2021
How to plot the graph between
versus m from this non linear equation given as
where
and
also
and
are constants . Further
represents the upper incomplete gamma function







4 commentaires
Réponse acceptée
Walter Roberson
le 14 Avr 2021
format long g
t_min = .3, t_max = .8
syms theta_opt m real
a = sin(theta_opt).^2;
b = (cos(theta_opt) - sin(theta_opt)).^2;
part1 = (4./(cot(theta_opt) - 1).^2).^((m+2)./(m+3));
part2a = igamma((m+1)/(2*m+6), b*t_min/2);
part2b = igamma((m+1)/(2*m+6), b*t_max/2);
part2c = igamma((m+1)/(2*m+6), a*t_min/2);
part2d = igamma((m+1)/(2*m+6), a*t_max/2);
part2 = (part2a - part2b) ./ (part2c - part2d);
part0 = part1 .* part2;
eqn = part0 - tan(2*theta_opt)
F = matlabFunction(eqn, 'Vars', [theta_opt, m]);
M = linspace(.1,0.5,30);
to0 = 1/2;
opt = optimoptions('fsolve','Display','off');
theta_vals = arrayfun(@(m) fsolve(@(t) F(t,m), to0, opt), M)
plot(M, theta_vals)
2 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!