blob: 795e04ff9347e42eb31bf7dbf7d4804e7085172b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clc
clear
//Input data
m=[20,80]//Masses of blocks in kg
F=1000//Force with which 20kg block is pulled in N
//Calculations
a=(F/(m(1)+m(2)))//Acceleration of the block in m/s^2
T=F-(m(1)*a)//Tension in the string in N
//Output
printf('The acceleration produced is %i m/s^2 \n The tension in the string connecting the blocks is %i N',a,T)
|