Am I doing this correctly? Projectile code
1 view (last 30 days)
Show older comments
Hi, I just was hoping to double check these results I'm getting, because I'm worried they may be off. These are the formulas/variables I was meant to use:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154480/image.png)
And then, using symbolic toolbox, I created a code to solve for V and Theta:
f1 = sym('1600 = -1/2*9.81*10^2 + V*sin(Theta)*10 + 0')
f2 = sym('1200 = V*cos(Theta)*10 + 0')
result = solve(f1,f2,'V','Theta')
V = result.V
Theta = result.Theta
Valid Initial Velocity, Vo = 241.04336 (m/s)
Valid Launch Angle, θ = 1.04969
I was then meant to check my results by plotting them with vectors. This is the part I am worried about, as I don't know much about physics, so I don't know if this looks right. Any and all help appreciated, thank you.
time = 0:1:10;
y = -1/2*9.81*time.^2 + 241.04336*sin(1.04969)*time - 1600;
x = 241.04336*cos(1.04969)*time - 1200;
plot(x,y)
title('Projectile')
ylabel('Projectile Height (m)')
xlabel('Projectile Range (m)')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154481/image.png)
0 Comments
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!