Question
PLEASE ONLY DO D IN MATLAB. I DID A B AND C, dont need them.
Intro to Computers for Engineers Recitation 11 In todays class, we are modeling a spacecraft. Please submit all functions yo
Write a function called hohmann that calculates the accelerations needed for a Hohmann transfer. It should take two inputs, a
Where F is the force ofthe engine, spaceship.engine, and m is the mass of the spaceship, spaceship.mass. Once you have a, you
0 0
Add a comment Improve this question Transcribed image text
Answer #1

As you have already written the code for the previous questions, I use the names for the variables a given in the question, so it wont be difficult for you.

function[spacecraft,status]=checkfuel(spacecraft,delta_v1,delta_v2)

status=false

m=spacecraft.mass

F=spacecraft.engine

fuel=spacecraft.fuel

alpha=F/m

time=(abs(delta_v1)-abs(delta_v2))/alpha

energy=F*m*time

if energy<fuel

   status=true

  spacecraft.fuel=fuel-energy

spacecraft.mass=mass-(spacecraft.fuel/(c*c))

end #for the if statement

end    #for the function

  

Add a comment
Know the answer?
Add Answer to:
PLEASE ONLY DO D IN MATLAB. I DID A B AND C, dont need them. Intro...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • could you please solve a and b? Chapier 2i. Note: you needn't derive Kepler's laws-but do...

    could you please solve a and b? Chapier 2i. Note: you needn't derive Kepler's laws-but do mention when you are using them, an describe the physical concepts involved and the meanings behind the variables. u) Consider two stars Mi and M; bound together by their mutual gravitational force (and isolated from other forces) moving in elliptical orbits (of eccentricity e and semi-major axes ai and az) at distances 11 in n and r from their center of mass located at...

  • Matlab Question Only do parts c, d, and g. Parts a and b are for reference....

    Matlab Question Only do parts c, d, and g. Parts a and b are for reference. This is a Matlab Question (Multipart-I already got someone to do a and b but they said I need to use another one of my questions to get c,d and g answered). The Maclaurin series expansion for e^x is e^x=1 + x/1! + x^2/2! + x^3/3! +x^4/4!... and it can be expressed in summation form as e^x = x^(k-1)/((k-1)!) The MATLAB function [exVal]=findEX(x,n) shown...

  • in C++, please help. Not only do we need to create an ADT but create a...

    in C++, please help. Not only do we need to create an ADT but create a main file as well to implement everything. For this program you will be creating a stack ADT to allow the client program to pick up treasures for a Star Wars scavenger game to get everyone ready for the opening of Galaxy’s Edge in 2020. Each treasure should have a (a) name, (b) description, (c) category, (d) what it is used for, and (e)if this...

  • C++ PROGRAM ONLY! For this lab you need to write a program that will read in...

    C++ PROGRAM ONLY! For this lab you need to write a program that will read in two values from a user and output the greatest common divisor (using a recursive implementation of the Euclidean algorithm) to a file. In Lab #3, you implemented this program using an iterative method. Greatest Common Divisor In mathematics, the greatest common divisor (GCD) of two or more integers (when at least one of of them is zero then the larger value is the GCD....

  • I need help with this assignment in C++, please! *** The instructions and programming style detai...

    I need help with this assignment in C++, please! *** The instructions and programming style details are crucial for this assignment! Goal: Your assignment is to write a C+ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, I'O manipulators, and the string class. File format: Here is an example of a file...

  • please Solve part D and E!!!!! PLEASE AND THANK YOU acc1 Our discussion of the Bohr...

    please Solve part D and E!!!!! PLEASE AND THANK YOU acc1 Our discussion of the Bohr model of the hydrogen atom was non-relativistic throughout, which was justified because the velocity of the electron in the nth state of Bohr's hydrogen atom was v= (1) 1377 where a = 1 is the fine-structure constant, and qe is the electron charge, ħ is (the reduced) Planck's constant, and c is the speed of light. Clearly, as n grows, the speed does become...

  • Please solve on only PART 2 b) and c) , PART 1 is only for REFERENCE...

    Please solve on only PART 2 b) and c) , PART 1 is only for REFERENCE :) Part I: Ene concept of a percentile (equivalently, quantile) is very important in data analysis. It applies to both samples and distributions. So, let's get some wi practice with them, starting with the binomial distribution. In prelab, you learned that the function gbinom(p. size prob) gives the p-th quantile of the binomial distribution with parameters n - size and pi prob. tocus on...

  • I need an OUTLINE ONLY (pseudocode/comments). DO NOT DO THE PROGRAMMING ASSIGNMENT. Part I: PA3 Outline...

    I need an OUTLINE ONLY (pseudocode/comments). DO NOT DO THE PROGRAMMING ASSIGNMENT. Part I: PA3 Outline (10 points). Create an outline in comments/psuedocode for the programming assignment below. Place your comments in the appropriate files: main.cpp, functions.h, dealer.cpp, dealer.h, dealer.cpp (as noted below). Place into a file folder named LastnamePA3, the zip the content and hand in a zip file to Canvas. Part II: PA3: Car Dealership (40 points) For Programming Assignment 3 you will be creating a program to...

  • C++ please A typical problem encountered in the study of dynamics is the trajectory problem. In...

    C++ please A typical problem encountered in the study of dynamics is the trajectory problem. In the situation illustrated below, a projectile is fired from the edge of a cliff with an initial velocity, Vo , and a firing angle, A. The cliff has a height, h. It is desired to:           1.       determine the distance, xt, to the target           2.       determine the highest elevation reached, ymax           3.       determine the time to reach the target, tt           4.      ...

  • I need help for part B and C 1) Create a new project in NetBeans called...

    I need help for part B and C 1) Create a new project in NetBeans called Lab6Inheritance. Add a new Java class to the project called Person. 2) The UML class diagram for Person is as follows: Person - name: String - id: int + Person( String name, int id) + getName(): String + getido: int + display(): void 3) Add fields to Person class. 4) Add the constructor and the getters to person class. 5) Add the display() method,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT