blob: d0a0c8218595d59b64f0674d7974d73e11632d02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc
clear
//Input data
m=10//Mass of block in kg
q=40//Angle made by the force with horizontal in degrees
s=5//Horizontal displacement of the block in m
u=0.3//Coefficient of kinematic friction
//Calculations
F=(u*m*9.8)/(cosd(q)+(u*sind(q)))//Pulling force in N
W=(F*cosd(q))*s//Workdone by the pulling force in J
//Output
printf('Workdone by the pulling force is %3.2f J',W)
|