simhwk10 - Estudiante: Vctor Gonzlez Matrcula: 805386...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Estudiante: Víctor González Matrícula: 805386 Problema - Recorrido de los satélites alrededor de la Tierra El código utilizado fue el descrito en el libro de texto con algunas modificaciones: clear, clf global G Me Re G=6.67e-11;Me=5.97e24;Re=64e5; f=@(t,x) df_sat(t,x); t0 = 0; T = 24*60*60; tf = T; N = 2000; R=4.223e7; v20s = [3071 3500 2000]; for iter = 1:length(v20s) x10 = R; x20 = 0; v10 = 0; v20 = v20s(iter); x0 = [x10 x20 v10 v20]; tol = 1e-6; %PARTE 'A' [tR,xR] = ode_RK4(f,[t0 tf],x0,N); [t45,x45] = ode45(f,[t0 tf],x0,N); [t23s,x23s] = ode23s(f,[t0 tf],x0,N); figure(1) plot(xR(:,1),xR(:,2), '-b' ,x45(:,1),x45(:,2), 'k.' , x23s(:,1),x23s(:,2), 'rx' ) legend( 'ode-RK4' , 'ode45' , 'ode23s' ) hold on %PARTE 'B', VALOR DE TOLERANCIA: 1E-6 figure(2) [t45,x45] = ode45(f,[t0 tf],x0,odeset( 'RelTol' ,tol)); [t23s,x23s] = ode23s(f,[t0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/01/2011 for the course SIMULACION SEM2 taught by Professor Hernandez during the Spring '11 term at ITESM.

Page1 / 2

simhwk10 - Estudiante: Vctor Gonzlez Matrcula: 805386...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online