Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Problem with Matlab program

1 visualización (últimos 30 días)
William Plummer
William Plummer el 16 de Feb. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentarios
Walter Roberson
Walter Roberson el 16 de Feb. de 2019
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 el 27 de Feb. de 2019
Sorry for such a late reply but I figured it out. Thank you!

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by