x = (v^2*sin(theta)^2)/g; % Where the projectile lands if it does not split it up
y = x*tan(theta)-(g*x^2)/(2*v^2*cos(theta)^2);% The trajectory the projectile takes.
plot(x,y)

댓글 수: 5

Rik
Rik 2019년 1월 23일
Probably because you are using matrix operation ( like ^ * and / ) instead of the element-wise operations ( .^ .* and ./)
Kevin Phung
Kevin Phung 2019년 1월 23일
can you provide more information on the other variables? Are theta and V constant?
If so then x is a constant and so is your y value-- so plotting would just give a point.
Can you also elaborate on 'Why wont my graph plot'.
Is no figure appearing at all? Is there an error message?
Osamah Ahmed
Osamah Ahmed 2019년 1월 23일
No error message, theta and v are constant. I need the graph to show a curve instead of a point.
Kevin Phung
Kevin Phung 2019년 1월 23일
So it is plotting, but just a point.
You cant get a curve if you dont have a variable in your equation.
Walter Roberson
Walter Roberson 2019년 1월 23일
Where is time in your equations ?

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2019년 1월 25일
편집: Image Analyst 2019년 1월 25일

1 개 추천

My attached projectile program (developed by me duing my son's college physics class) plots and computes just about everything you could possibly want regarding a drag-free projectile.
0001 Screenshot.png
madhan ravi
madhan ravi 2019년 1월 24일

0 개 추천

Put dots in front of ^ and * (element wise operation ) since x is a vector , you will get a curve.

댓글 수: 7

Walter Roberson
Walter Roberson 2019년 1월 25일
No they won't. They have no time component in their equations. They said that theta and v are constant; that is going to give constant x and constant y unless g is non-scalar. And if your gravity is not a constant, then you definitely need to include a time component in your equations.
Image Analyst
Image Analyst 2019년 1월 25일
편집: Image Analyst 2019년 1월 25일
Gravity is not exactly a constant (as you know). It changes with the projectile's altitude, and since the altitude changes with time of flight, the gravity changes with time, though probably negligibly.
In fact one thing people don't realize is that the gravity in the International Space Station is almost the same as on earth. You weigh more in the "weightless" environment of the ISS than on the moon! Surprising, to most people. Just calculate it using Newton's gravitational force formula and see for yourself:
F_earth = G*m1*m2/6371^2 m1 = mass of earth, m2 = mass of human
F_ISS = G*m1*m2/(6371 + 400)^2 400 is distance of ISS above earth's surface in km
ratio = 6331^2 / (6731^2) = 88.4% as much on ISS as on earth.
Just another astronomical, non-intuitive, fun fact (like meteorites being burning hot when they land, etc.)
I really admire rocket scientists (like my late father) who were able to do all those calculations, with complicating things like drag, multiple moving bodies, changing gravity, etc., with the primitive computers at the time.
madhan ravi
madhan ravi 2019년 1월 25일
oops ! didn’t read the comment given by the user thank you both.
Image Analyst
Image Analyst 2019년 1월 25일
Interesting. So they have all kinds of temperatures. Well there are at least enough of them falling on the Antarctic such that NASA has a team of people on snowmobiles searching the Antarctic for them. The ones they find were evidently cooled down enough by the frigid -60 degree upper atmosphere air that they land on the snow and just sit there - they don't melt through. Or at least the ones they find don't, and they find more in the Antarctic than anywhere because they're easy to see. I wonder if Answers contributor Chad Greene has personally found any of these at the Antarctic.
Chad Greene
Chad Greene 2019년 2월 15일
@ImageAnalyst, they're easiest to find in the McMurdo Dry Valleys, where there's very little weathering. Footprints can stick around for decades there.
Image Analyst
Image Analyst 2019년 2월 16일
Are they sitting on the snow, or gravel? How do they find them? By sight (sitting on snow) or my metal detectors?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기

질문:

2019년 1월 23일

댓글:

2019년 2월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by