find the smallest value of the surface area A in the vector A and the corresponding values of x and y in the vectors x and y.

1 visualizzazione (ultimi 30 giorni)
>> x = 0.5:0.05:3.5
x =
Columns 1 through 6
0.5000 0.5500 0.6000 0.6500 0.7000 0.7500
Columns 7 through 12
0.8000 0.8500 0.9000 0.9500 1.0000 1.0500
Columns 13 through 18
1.1000 1.1500 1.2000 1.2500 1.3000 1.3500
Columns 19 through 24
1.4000 1.4500 1.5000 1.5500 1.6000 1.6500
Columns 25 through 30
1.7000 1.7500 1.8000 1.8500 1.9000 1.9500
Columns 31 through 36
2.0000 2.0500 2.1000 2.1500 2.2000 2.2500
Columns 37 through 42
2.3000 2.3500 2.4000 2.4500 2.5000 2.5500
Columns 43 through 48
2.6000 2.6500 2.7000 2.7500 2.8000 2.8500
Columns 49 through 54
2.9000 2.9500 3.0000 3.0500 3.1000 3.1500
Columns 55 through 60
3.2000 3.2500 3.3000 3.3500 3.4000 3.4500
Column 61
3.5000
>> y = 1.5./x.^2
y =
Columns 1 through 6
6.0000 4.9587 4.1667 3.5503 3.0612 2.6667
Columns 7 through 12
2.3437 2.0761 1.8519 1.6620 1.5000 1.3605
Columns 13 through 18
1.2397 1.1342 1.0417 0.9600 0.8876 0.8230
Columns 19 through 24
0.7653 0.7134 0.6667 0.6243 0.5859 0.5510
Columns 25 through 30
0.5190 0.4898 0.4630 0.4383 0.4155 0.3945
Columns 31 through 36
0.3750 0.3569 0.3401 0.3245 0.3099 0.2963
Columns 37 through 42
0.2836 0.2716 0.2604 0.2499 0.2400 0.2307
Columns 43 through 48
0.2219 0.2136 0.2058 0.1983 0.1913 0.1847
Columns 49 through 54
0.1784 0.1724 0.1667 0.1612 0.1561 0.1512
Columns 55 through 60
0.1465 0.1420 0.1377 0.1337 0.1298 0.1260
Column 61
0.1224
>> v = x.^2.*y
v =
Columns 1 through 5
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 6 through 10
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 11 through 15
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 16 through 20
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 21 through 25
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 26 through 30
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 31 through 35
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 36 through 40
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 41 through 45
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 46 through 50
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 51 through 55
1.5000 1.5000 1.5000 1.5000 1.5000
Columns 56 through 60
1.5000 1.5000 1.5000 1.5000 1.5000
Column 61
1.5000
>> sa = 4.*(x.*y)+(x).^2
sa =
Columns 1 through 5
12.2500 11.2116 10.3600 9.6533 9.0614
Columns 6 through 10
8.5625 8.1400 7.7813 7.4767 7.2183
Columns 11 through 15
7.0000 6.8168 6.6645 6.5399 6.4400
Columns 16 through 20
6.3625 6.3054 6.2669 6.2457 6.2404
Columns 21 through 25
6.2500 6.2735 6.3100 6.3589 6.4194
Columns 26 through 30
6.4911 6.5733 6.6657 6.7679 6.8794
Columns 31 through 35
7.0000 7.1293 7.2671 7.4132 7.5673
Columns 36 through 40
7.7292 7.8987 8.0757 8.2600 8.4515
Columns 41 through 45
8.6500 8.8554 9.0677 9.2867 9.5122
Columns 46 through 50
9.7443 9.9829 10.2278 10.4790 10.7364
Columns 51 through 55
11.0000 11.2697 11.5455 11.8273 12.1150
Columns 56 through 60
12.4087 12.7082 13.0135 13.3247 13.6416
Column 61
13.9643
>> plot(x,sa,'linestyle',':')

Risposte (1)

ANKUR KUMAR
ANKUR KUMAR il 12 Mar 2021
You can simply use boolean function to find the location of minimum surface area, and subsquently use the same index to get the values of x and y.
x = 0.5:0.05:3.5;
y = 1.5./x.^2;
sa = 4.*(x.*y)+(x).^2;
index=find(sa==min(sa));
smallest_sa=sa(index)
corresponding_x=x(index)
corresponding_y=y(index)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by