Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Problem with Matlab program

조회 수: 3 (최근 30일)
William Plummer
William Plummer 2019년 2월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
Im having some issues with my program, Im trying to compute the ideal-line-of-sight angle for a problem but I cant input my Distance or time. I was working on this same issue earlier today and there was not a problem (although I was using a earlier edition of Matlab). This is what I have for my script so far:
clear
clc
%% Part A
disp('Food delievery requirements')
a=input('what is the horizontal speed in mph?');
b=input('what is the altitude of the airplane in meters?');
time=sqrt(b/4.9);
fprintf('%2.2\t',time);
disp('seconds')
%% Part B
v=a.*.44704;
Distance=(v.*time)+(1/2.*0.*time^2);
fprintf('%3.2\t', Distance)
disp('meters')
The formula that im using won't display any numbers in this edition. I also plan on using whatever numbers that result from the input to place into an inverse tangent function to get the line- of- sight angle. Will this work or is there a better method that I can use?
  댓글 수: 3
Walter Roberson
Walter Roberson 2019년 2월 16일
your a variable looks like either thrust rate or fuel supply. Thrust has to be divided by current mass to get acceleration and current mass decreases as fuel is burned (so acceleration increases because the object is getting lighter . ) Your code does not appear to take mass into account .
William Plummer
William Plummer 2019년 2월 27일
Sorry for such a late reply but I figured it out. Thank you!

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by