Solving a System of Nonlinear Equations using MATLAB

  Рет қаралды 3

Charley Yang

Charley Yang

Күн бұрын

Пікірлер: 1
@WonYYang
@WonYYang 3 сағат бұрын
%nm04e03_1.m clear G=6.67e-11; Ms=1.98e30; Me=5.98e24; R=1.49e11; T=3.15576e7; w=2*pi/T; % Earth's angular velocity f=@(r)G*(Ms./(r.^2+eps)-Me./((R-r).^2+eps))-r*w^2; r0=1e6; % Initial (starting) guess rn=Newtons(f,r0,1e-4,100) % using Newtons() rfs=fsolve(f,r0) % using fsolve() options=optimoptions('fsolve','Display','off','MaxFunEvals',1000); rfs1=fsolve(f,r0,options) % more iterations r01=1e10 % with another initial guess closer to the solution rfs2=fsolve(f,r01,options) options=optimoptions('fsolve','Display','off','MaxFunEvals',1000,... 'TolX',1e-6, 'TolFun',1e-16); rfs3=fsolve(f,r0,options) % more iterations residual_errs=f([rn rfs rfs1 rfs2 rfs3])
MATLAB Analysis and PSpice Simulation of an OP amp Circuit
17:02
Nonlinear Equation Solver with MATLAB
16:51
Charley Yang
Рет қаралды 15
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 126 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 13 МЛН
I Built the World's Biggest Hydrofoil Board
16:57
rctestflight
Рет қаралды 259 М.
The Quest To Make Unbreakable Glass
22:23
Veritasium
Рет қаралды 2,3 МЛН
The Most Important Problem In Physics (The Fermi Paradox)
14:57
THE 4 MOST FAVORITE ELECTRONIC PROJECTS OF 2024
15:40
ZAFER YILDIZ
Рет қаралды 49 М.
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 126 МЛН