function [t,v,m] = rocket_euler(delt,simend,params) %%This function simulates a rocket's velocity during launch using Euler's %method. %%Inputs: delt - step size for Euler's method (s) % simend - final simulation time (s) % params - launch parameters (structure variable, with fields c, m0, and mdot) %%Outputs: t - time vector for simulation (s) % v - velocity vector of simulation (m/s) % m - mass vector of simulation (kg) %%Author: Mx. Gator %Get the variables we need out of the params structure variable provided by the user c = params.c; %thrust coefficient (m/s) m0 = params.m0; %initial mass (kg) mdot = params.mdot; %fuel burn rate (kg/s) end