{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CHE 210 HW2 Solution

CHE 210 HW2 Solution - Force 2 direction(degrees-20 Force 2...

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

>> type pin % Steve Swinnea % Program to find resultant force on a single point % with three 2D forces acting on it. F1m = input('Force 1 magnitude (N): '); F1d = input('Force 2 direction (degrees): '); F2m = input('Force 2 magnitude (N): '); F2d = input('Force 2 direction (degrees): '); F3m = input('Force 3 magnitude (N): '); F3d = input('Force 3 direction (degrees): '); %Calculations: F1 = [F1m*cosd(F1d) F1m*sind(F1d)]; F2 = [F2m*cosd(F2d) F2m*sind(F2d)]; F3 = [F3m*cosd(F3d) F3m*sind(F3d)]; Fres = F1+F2+F3; Resm = norm( Fres ); Resd = atan2( Fres(2) , Fres(1) )*180/pi; %must use atan2 not atand fprintf('\nMagnitude of Resultant: %0.1f\n',Resm); fprintf('Direction of Resultant: %0.1f\n',Resd); >> pin Force 1 magnitude (N): 400

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.

Unformatted text preview: Force 2 direction (degrees): -20 Force 2 magnitude (N): 500 Force 2 direction (degrees): 30 Force 3 magnitude (N): 700 Force 3 direction (degrees): 143 Magnitude of Resultant: 590.0 Direction of Resultant: 64.9 >> type work %Steve Swinnea %A Program that calculates work from a force %and displacement vector F1 = input('Enter force vector 1: '); F2 = input('Enter force vector 2: '); d = input('Enter displacement vector: '); Res = F1+F2; W = Res*d'; %Assumes both are row vectors Angle = acosd( W/norm( Res )/norm( d ) ); fprintf('\nWork Done: %0.2f\n', W); fprintf('Angle: %0.1f\n', Angle); >> work Enter force vector 1: [15 20 5] Enter force vector 2: [20 -5 7] Enter displacement vector: [10 5 1] Work Done: 437.00 Angle: 12.8...
View Full Document

{[ snackBarMessage ]}