Matlab to produce numerical and analytical solutions, MATLAB Programming

This assignment is motivated by the use of flybys of planets / moons in spacecraft missions to alter a spacecraft's trajectory (flight path). Planetary flybys can be used to not only change the direction of a spacecraft's motion, but to also alter its speed. Such flybys are often referred to as "gravity assists" since the change to the spacecraft's motion is enabled by the force on the spacecraft due to the planet's gravity field. For example, missions to the outer solar system typically use the gravity of Jupiter to provide a "boost" to the spacecraft's speed, such that the spacecraft can actually make it to the outer solar system. In contrast, missions to the inner solar system typically use the gravity field of one or more planets to slow the spacecraft down enough that it can go into orbit around the desired planet.

In this assignment we will construct a simplified planetary flyby. The simplifications are that we assume an otherwise "straight-line" path of the spacecraft (rather than starting with an elliptical orbit around the sun, or a hyberbolic trajectory into the outer solar system), and we assume that the planet is stationary during the flyby (in practice the planet is of course in an elliptical orbit around the Sun). In the assignment we will draw on much of what we have learned in the course to implement a numerical integration algorithm in MATLAB to compute a spacecraft's acceleration, velocity and position as it flys by a planet. The assignment will also demonstrate how you can use

MATLAB to produce numerical solutions to problems for which there is no simple analytical solution.

Coding Overview

For this assignment you will write 3 functions and several scripts. The functions are as follows:

a.) The guts of your code will be a function get_traj.m that will return the acceleration, velocity and position vectors along the complete spacecraft trajectory. get_traj.m will call three subfunctions gravacc.m,

scvelpos.m, and checkinit.m.

b.) gravacc.m will calculate the gravitational acceleration on the spacecraft at each time step.

c.) scvelpos.m will compute the instantaneous change in position and velocity of the spacecraft due to the gravitational acceleration caused by the planet.

d.) checkinit.m will check that your initial spacecraft velocity and position are feasible.

e.) The main script(s) will call get_traj.m for various initial (starting) conditions that I will give you. The main script(s) will contain the code to generate the requested figures or output in each section.


1. The use of SI units is ESSENTIAL to this assignment. Make sure to convert ALL your length, mass and time variables into m, kg and seconds before doing any calculations. For plotting purposes it will be easier to use km, convert m to km only for plotting.

2. The amount of code required for this assignment is not huge. For example, my versions of functions get_traj.m,

gravacc.m, scvelpos.m, and checkinit.m contain 11, 4, 2 and 3 lines of code respectively, not including comment and help lines. However, you should be vigilent about being consistent in your use of variable names, and in not generating unnecessary variables; otherwise your code (and thinking!) will get out of hand.

3. Make sure your code is organized into easily readable, compact coding "blocks", with appropriate comment lines, and separated by white space.

4. All functions must contain help lines.

Posted Date: 3/9/2013 5:14:17 AM | Location : United States

Related Discussions:- Matlab to produce numerical and analytical solutions, Assignment Help, Ask Question on Matlab to produce numerical and analytical solutions, Get Answer, Expert's Help, Matlab to produce numerical and analytical solutions Discussions

Write discussion on Matlab to produce numerical and analytical solutions
Your posts are moderated
Related Questions
An individual with $10,000 to invest has identi?ed three mutual funds as attractive opportunities. Over the last ?ve years, dividend payments (in cents per dollar invested) have be

how to create adjacency matrix for amino acids in matlab?

Strings: The MATLAB also handles strings that are a sequence of characters in single quotes. For illustration, using the double function on a string will represent the equival

A band pass FIR filter is required to pass frequencies from 5KHz to 8KHz, using a sample rate of 40K i) Explain how this would map to normalization sampling frequencies in radia

Make a vector of 500 random numbers from a normal distribution with mean 2 and standard deviation 5(randn). a After you generate the vector, verify that the sample mean and stan

I need assistance in learning on how to do simulation of system described with an algebraic equations.

Find the boundary between each two of the equations P1, P2, P3 by solving: P1 = P2  ,  P1 = P3  ,  P2 = P3 Plot the boundary lines on a single figure that also includes the

Create MATLAB program(s) that solve a problem of your own choice. You may opt to solve work related problem, an industrial problem, or problem from your research project. Markin

I want to write a function in matlab which gives me a population pyramid bar chart. could you please help me do this.

The pressure radiated by a column of in-phase monopole sources may be expressed as: Create a model (spreadsheet / MATLAB etc) for a 6 element column, where d=0.2m . Figure