This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full 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
This note was uploaded on 09/26/2010 for the course CHE 210 taught by Professor Swinnea during the Fall '08 term at University of Texas at Austin.
- Fall '08