blob: 655abdd0cd3f2332d04147a00e6352b208218ef5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
clear;
clc;
// Example 1.1
printf('Example 1.1\n\n');
//Page no. 13
// Solution
//(a)
printf('(a) We cannot add the two terms since both have different dimensions. 1 foot has the dimension of the length, whereas 3 seconds has the dimension of time.\n');
//(b)
// Converting all terms to same unit
hp = 746;//[watts]
total = 1*hp+300;//[watts]
printf(' (b) Answer is %i watts.',total);
|