Homework-4-Solutions

Homework-4-Solutions - ME 104 Engineering Mechanics II...

This preview shows pages 1–17. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
% ME 104: Engineering Mechanics II % Solution to Homework 4: Problem 6 % Prepared by Mohammad Rafiee % Date: Feburary 18, 2011 %---------------------------------------------------------------------- clc; clear all ; % ----------------------- defining the parameters --------------------- g = 9.81; r0 = 0.1; l = 1; w0 = 1; % ----------------------- calculating r, theta, x and y --------------- t = [0:.01:2.99]; r = r0*cosh(w0*t); theta = w0*t; x = r.*cos(theta); y = r.*sin(theta); % ----------------------- the bonus part: after t=3 sec --------------- Vr = r0*w0*sinh(w0*t); Vtheta = r0*w0*cosh(w0*t); Vx_0 = Vr(end)*cos(theta(end)) - Vtheta(end)*sin(theta(end)); Vy_0 = Vr(end)*sin(theta(end)) + Vtheta(end)*cos(theta(end)); t2 = [0:.01:3]; x2 = Vx_0*t2 + x(end); y2 = Vy_0*t2 + y(end); z2 = -.5*g*t2.^2; % -------------------------generating the plots ----------------------- figure; plot(x,y) hold on x1 = [-1:.01:1]; plot(x1, sqrt(1-x1.^2), 'r' ) hold on plot(x1, -sqrt(1-x1.^2), 'r' ) axis equal axis([-1 1 -1 1]) title( 'Particle trajectory until t = 2.99 sec' ) ylabel( 'x (m)' ) xlabel( 'y (m)' ) grid on figure; subplot(2,2,1) plot(t,x) title( 'x vs. time' ) ylabel( 'x (m)' ) xlabel( 't (sec)' ) grid on subplot(2,2,2) plot(t,y) title( 'y vs. time' ) ylabel( 'y (m)' ) xlabel( 't (sec)' ) grid on
subplot(2,2,3) plot(t,r) title( 'r vs. time' ) ylabel( 'r (m)' ) xlabel( 't (sec)' ) grid on subplot(2,2,4)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern