Answer:
%Program prompts user to input vector
v = input('Enter the input vector: ');
%Program shows the value that user entered
fprintf('The input vector:\n ')
disp(v)
%Loop for checking all array elements
for i = 1 : length(v)
%check if the element is a positive number
if v(i) > 0
%double the element
v(i) = v(i) * 2;
%else the element is negative number.
else
%triple the element
v(i) = v(i) * 3;
end
end
%display the modified vector
fprintf('The modified vector:\n ')
disp(v)
Answer:
a) Internal energy
Explanation:
As we know that internal energy is a point function so it did not depends on the path ,it depends at the initial and final states of process.All point function property did not depends on the path.Internal energy is a exact function.
Work and heat is a path function so these depend on the path.They have different values for different path between two states.Work and heat are in exact function.
We know that in ir-reversible process entropy will increase so entropy will be different for reversible and ir-reversible processes.
Step 1:
Start by setting it up with the divisor 8 on the left side and the dividend 27 on the right side like this:
8 ⟌ 2 7
Step 2:
The divisor (8) goes into the first digit of the dividend (2), 0 time(s). Therefore, put 0 on top:
0
8 ⟌ 2 7
Step 3:
Multiply the divisor by the result in the previous step (8 x 0 = 0) and write that answer below the dividend.
0
8 ⟌ 2 7
0
Step 4:
Subtract the result in the previous step from the first digit of the dividend (2 - 0 = 2) and write the answer below.
0
8 ⟌ 2 7
- 0
2
Step 5:
Move down the 2nd digit of the dividend (7) like this:
0
8 ⟌ 2 7
- 0
2 7
Step 6:
The divisor (8) goes into the bottom number (27), 3 time(s). Therefore, put 3 on top:
0 3
8 ⟌ 2 7
- 0
2 7
Step 7:
Multiply the divisor by the result in the previous step (8 x 3 = 24) and write that answer at the bottom:
0 3
8 ⟌ 2 7
- 0
2 7
2 4
Step 8:
Subtract the result in the previous step from the number written above it. (27 - 24 = 3) and write the answer at the bottom.
0 3
8 ⟌ 2 7
- 0
2 7
- 2 4
3
You are done, because there are no more digits to move down from the dividend.
The answer is the top number and the remainder is the bottom number.
Therefore, the answer to 27 divided by 8 calculated using Long Division is:
3