MATLAB


Test Cases:
% [area1] = integrals(int1, int2)
int1 =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
int2 =
Columns 1 through 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
3 6 9 12 15 18 21 24 27 30 33 36 39 42
Columns 15 through 20
15 16 17 18 19 20
45 48 51 54 57 60
Matlab function:
============
function [area] = integrals(int1, int2)
I1=(1/2)*(int1(2,1)+int1(2,end)+2*sum(int1(2,2:end-1))); %
trapezoidal integration
I2=(1/2)*(int2(2,1)+int2(2,end)+2*sum(int2(2,2:end-1)));
area=round(abs(I1-I2),2); % area between two curves rounded upto
two decimal places
if I2<I1
dumm=int1; % swap arrays if I2<I1
int1=int2;
int2=dumm;
end
hold on
plot(int1(1,:),int1(2,:),'r') % plotting curves
plot(int2(1,:),int2(2,:),'g')
for i=1:length(int1)
x=int1(2,i):int2(2,i);
plot(int1(1,i)*ones(1,length(x)),x,'m*') % filling area with
stars
end
hold off
end
=============
Output:

MATLAB Test Cases: % [area1] = integrals(int1, int2) int1 = 1 2 3 4 5 6...
Please write in the answer clear. Will leave like if its
correct
.
Age
Gen
Sibs
Work
Exercise
Units
Mom
18
M
1
20
10
15
6
17
F
3
0
7
15
14
23
M
3
20
5
13
8
20
M
2
0
5
15
16
18
F
4
22
6
16
9
20
F
2
11
7
20
20
34
F
1
48
10
10
18
22
F
3
37
13
13
18
19
M
3
0...
Output MWTP MC 1 20 5 2 18 6 3 16 7 4 14 8 5 12 9 6 10 11 7 8 15 8 6 21 9 4 30 10 2 40 1. The values for MWTP and MC are given belohli a. Graph these curves and find equilibrium. b. label consumer and producer surplus. c. Show that any other level [Q] the net social bei!!! Why?
Quantity FC VC AFC AVC ATC MC [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] 30
Exercise for Section A 1. (10)3 +5)-? 3. (6-5+2)(5)-? 4.8+ (5(4)- 5. (10)(11)-1-? 6. 5+ 12/4-? 7. 10 + (2)(5)-5-? 8. 25-(92)+3-? 9. [(4 + 73- DI8-3]-? 10. [(3+5)+ (DX2)12- 11. The result of multiplication is known as the C. sum. 12. The result of addition is known as the C. sum. A. product. B. quotient. D. difference. A. product. B. quotient. 13. (4 +6(11)-? 14. (7-1+2)(4)-? 15. 20/(5 +5)-? 16. 9 +8/2-? 17. (12)(12)-3- 18. 9+ (4x8)-? 19. 15/3...
Game
Point_Differential Assists
Rebounds Turnovers Personal_Fouls
1 15 15 38
11 9
2 36 20 43
8 13
3 16 21 29
7 13
4 45 22 46
11 11
5 12 11 40
7 22
6 -10 10 31
13 26
7 11 19 45
11 7
8 12 16 32
16 14
9 3 16 27
18 15
10 19 9 34
17 17
11 40 16 41
9 17
12 44 12 29
9 22
13 16 ...
4 15 24 10 1 27 31 14 2 16 32 7 13 36 29 6 1 18 14 15 18 5 20 29 15 7 32 36 17 15 19 35 10 16 39 27 14 1 16 12 13 16 0 20 0.10 005 20 0 25 5 10 S 20 25 30 MacBook Air 2 3 10 15 20 25 30 5 10 15 20 25 30 30 40 10 20 o 1015 2025 30 35 030...
Please write answers clear. I will leave like if its
correct.
Age
Gen
Sibs
Work
Exercise
Units
Mom
18
M
1
20
10
15
6
17
F
3
0
7
15
14
23
M
3
20
5
13
8
20
M
2
0
5
15
16
18
F
4
22
6
16
9
20
F
2
11
7
20
20
34
F
1
48
10
10
18
22
F
3
37
13
13
18
19
M
3
0
18
14...
Prices with 5-day moving average line Price 5-Day Moving Average 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 The moving average generates buy signal(s) ___ Multiple Choice O on days 3, 11, and 15 o on days 2. 8. and 16 o on days 5.9 and 13 on no days
Please write answers clear. Will leave like if its correct.
Age
Gen
Sibs
Work
Exercise
Units
Mom
18
M
1
20
10
15
6
17
F
3
0
7
15
14
23
M
3
20
5
13
8
20
M
2
0
5
15
16
18
F
4
22
6
16
9
20
F
2
11
7
20
20
34
F
1
48
10
10
18
22
F
3
37
13
13
18
19
M
3
0
18
14
18...
matlab help
Write a script to manipulate the array A = [2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19] to be in descending order without using the sort function. You must do everything using array manipulation in MATLAB (i.e. you cannot sort it by hand and then hardcode it, you cannot simply create the array 1:20, you cannot simply add .rej3mat(J-l 1],1,10) to A). Write a script that...