Question

Problem 2 (explain each codes please) If more information if needed please let me know 1)...

Problem 2 (explain each codes please)

If more information if needed please let me know

1) % time vector

t=linspace(0,1,1000);

x = zeros(size(t));

y = zeros(size(t));

Meaning:

3)% loop to find the value of x and y for different values of time

for i=1:length(t)

x(i) = v*cos(angle_theta)*t(i);

y(i) = h+v*sin(angle_theta)*t(i)-(0.5*g*(t(i).^2));

end

Meaning:

4)% find the first index where y<=0 i.e the ball hits the ground

I = find(y<=0,1);

fprintf('The ball hits the ground at distance of %f meters\n',x(I));

Meaning:

5) plot(x,zeros(size(t)),'k--');

Meaning:

Homework Answers

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
Let x be the vector 1:366. Use a nested for loop to estimate, for each value...
Let x be the vector 1:366. Use a nested for loop to estimate, for each value of the vector x[i] = i, the corresponding probability y[i] that there will be at least one common birthday if there are i people in a room (ignore leap years, as usual). Your for loop should create a vector y of the same size as x. Now use the plot command plot(x,y) to draw the graph. Use google to see how to add some...
Problem 3 you can use Matlab and also i give u the Problem 1 code its...
Problem 3 you can use Matlab and also i give u the Problem 1 code its on Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandpass filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce this is the Problem 1 code and the solutin clear; clc;...
2. Write the output matrix “v” t = [2:4]; k = [1:3]; v = t.*k –...
2. Write the output matrix “v” t = [2:4]; k = [1:3]; v = t.*k – k.^2 4. Given: D = [1 2 3 4 5 6 7 8 9] (3x3) . Which command will extract the submatrix [1 2 3 4 5 6] (2x3) ? a. D[1:2,1:3] b. D(1,2 ;1,3) c. [D(1:2),D(1:3)] d. D(1:2,1:3) 14. What will be the dimension of matrix B? B=[ones(3) zeros(3) rand(3); 2*eye(9)] 18. Find the value of “C” A=1:2:10; B=linspace(1,5,5); C = length(A)*B(2)+A(5)*B(3); 19....
1.). Two sinusoidal waves are moving through a medium in the same direction, both having amplitudes...
1.). Two sinusoidal waves are moving through a medium in the same direction, both having amplitudes of 4.00 cm, a wavelength of 3.50 m, and a period of 6.25 s, but one has a phase shift of an angle φ. What is the phase shift (in rad) if the resultant wave has an amplitude of 4.00 cm? Hint: Use the trig identity 2.). Consider two sinusoidal sine waves traveling along a string, modeled as y1(x, t) = (0.2 m)sin[(6 m−1)x...
Please circle answers 1. A company that produces cell phones has a cost function of C(x)=3x^2−1500x+39900...
Please circle answers 1. A company that produces cell phones has a cost function of C(x)=3x^2−1500x+39900 where C is cost in dollars and x is number of cell phones produced (in thousands). How many units of cell phones minimizes this cost function? 2. A ball is thrown into the air and its position is given by h(t)=−4.9t^2+70t+5 where tt is measured in seconds and h(t) is measured in meters above the ground. Find the height at which the ball stops...
VPython Physics 1211k 1. Here is a somewhat more sophisticated program that recreates one of your...
VPython Physics 1211k 1. Here is a somewhat more sophisticated program that recreates one of your experiments – a cart rolling up a ramp and back down. Particularly pay attention to the components of the acceleration. from visual import * #control the dimensions of the animation window. Turn off autoscaling. Then set the window to show 20 meters #in each direction. Then set the actual physical size of the animation window on the screen scene.autoscale = False scene.range = 20...
I understand how to do the problem. What I am confused on is more conceptual. Why...
I understand how to do the problem. What I am confused on is more conceptual. Why is 70.5 the maximum angle? What does it mean when I plug in a smaller angle and get an imaginary answer? Why are larger angles not applicable? A cannon shoots a cannon ball at a launch angle of theta above the horizontal ground with initial speed v_0. (a) Neglecting air resistance, use Newton's second law to find the ball's position as a function of...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT