Code covered by the BSD License  

Highlights from
Gravity

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 6.34 KB File ID: #25117
image thumbnail

Gravity

by link2358 noname

 

24 Aug 2009

Computes position of several bodies under the action of gravitatory forces.

| Watch this File

File Information
Description

% calling sequence commands

%computes the position and velocities of the several bodies under %the action of gravitatory forces.
%The basic strategy is the Newmark method for time integration %and Newton-Raphson method for the non-linearity of the problem

gravity2

% given starting body, launching time and launching direction,
% computes velocity to impact target.
%The basic numerical strategy is the secant method for root
% finding
% SOLUTION MIGHT NOT EXIST
[iniv,iiter,error] = findv(3,7,0.1,0.5,600,[0;-1],1e-5,1e-7,30);

% given starting body, and launching time, computes initial direction so
% that launch velocity is minimal (launch velocity = escape velocity)
% The basic numerical strategy is the secant method for root finding
% SOLUTION MIGHT NOT EXIST
[alpha1, iniv1, error, kiter] = secant1(3,7,0.1,300,0.5,1e-5,1e-7,30,-pi/2);

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
aerospace link2358 noname 24 Aug 2009 13:08:06
numerical methods link2358 noname 24 Aug 2009 13:08:07
aerospace ZerO 02 Sep 2009 11:26:16

Contact us at files@mathworks.com