Question

Problem 2 (5 pts) Recall that the equation for projectile motion when acceleration is constant can...

Problem 2 (5 pts)

Recall that the equation for projectile motion when acceleration is constant can be written as

y = y0 + v0t +(a/2)t^2

(2)

Create a spreadsheet to plot y(t). You should be able to easily change the initial velocity, the initial position,

and the acceleration. Be sure to include axis labels as appropriate. The spreadsheet should be easy to use by

anyone.

Problem 3 (5 pts)

Repeat problem 2 using Matlab. Specifically, create a Matlab function called projectile.m that takes y0, v0, a and

a vector of t as arguments.

The function should:

1. Plot y(t) with labeled axes and a grid on the plot.

1

2. Return the vector y(t).

Additional requirement:

Be sure to document your function thoroughly so that when you type “help projectile” Matlab will print

out a message about what the function does and how to use it, along with examples of usage.

Homework Answers

Answer #1

part 2)

Part 3)

promt = 'initial value of position';

y_0 = input(prompt);

promt = 'initial value of velocity';

v_0 = input(prompt);

promt = 'acceleration';

a = input(prompt);

t = zeros(1,m);

y = zeros(1,m);

for i = 1:m

{

prompt = 'please insert the time';

t[i] = input(prompt);

y[i] = u_0 + t[i]*v_0 + 0.5*t[i]*a^2

}

plot (t,y);

Know the answer?
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
Similar Questions
A projectile motion (i.e. cannon) can be modeled via the following equations: x=u cos⁡θ t y=-0.5...
A projectile motion (i.e. cannon) can be modeled via the following equations: x=u cos⁡θ t y=-0.5 g t^2+u sin⁡θ t Where: x: Position of the cannonball after t seconds in the x-direction (meters) y: Position of the cannonball after t seconds in the y-direction (meters) u: Initial velocity of the cannonball (meters per second) g: Acceleration due to gravity (meters per second squared) t: Time (seconds) In this question, we are trying to see the effects of the angle ϴ...
Using MATLAB to solve the problem: The USS Missouri is a battleship with 16-inch guns. A...
Using MATLAB to solve the problem: The USS Missouri is a battleship with 16-inch guns. A projectile is fired from one of the guns at an angle of elevation ϴ = 42 degree from the sea-level with a velocity Vo = 820 m/s. Neglecting air resistance and assuming the projectile is fired across the sea, using Matlab determine: (a) How much time the projectile will be in flight (tf). (b) How far away from the battleship the projectile will hit...
PLEASE USE MAT LAB ONLY. THANK YOU (a) Create and plot the signals listed below and...
PLEASE USE MAT LAB ONLY. THANK YOU (a) Create and plot the signals listed below and save your Matlab code in a script file. i) Cosine signal of frequency 100 Hz over the range [0,0.1] seconds and samples spaced 10^- 4 seconds apart with a phase of pi/2 and an amplitude of 1.   PLEASE USE MAT LAB ONLY. THANK YOU ii) A square wave that oscillates between 0 and 1 every five samples, plot 3 periods of the waveform. iii)...
Problem Set 2: Pearson’s correlation (7 pts) Research Scenario: Is there a positive relationship between grit...
Problem Set 2: Pearson’s correlation (7 pts) Research Scenario: Is there a positive relationship between grit and GPA in high school seniors? A researcher examined this issue by having students beginning their senior year of high school complete a grit inventory using a Likert-based scale (range 1 – 7), where higher numbers indicate more “grit”. GPA was self-reported (scale 0 – 4.0). Enter the data shown here into SPSS to assess whether there is a positive relationship between grit and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT