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
- Fall '08
- Force, displacement vector, magnitude direction, Steve Swinnea, Enter force vector, Fres