help needed workdue tomorrow

์กฐํšŒ ์ˆ˜: 4 (์ตœ๊ทผ 30์ผ)
Yusuf Muhammad Khan
Yusuf Muhammad Khan 2019๋…„ 11์›” 6์ผ
๋Œ“๊ธ€: John D'Errico 2019๋…„ 11์›” 6์ผ
i need a numerical solution to the question below please, my code doesnt work:
question
The volume ? and paper surface area ? of a conical paper cup are given by ? = 1 3 ?? 2โ„Ž ? = ??โˆš? 2 + โ„Ž 2 where ? is is the radius of the base of the cone and โ„Ž is the height of the cone. a. By eliminating โ„Ž, obtain the expression for ? as a function of ? and ?. [2 marks] b. Create a user-defined function that accepts ? as the only argument and computes ? for a given value of ?. Declare ? to be global within the function. [2 marks] c. For ? = 10 [??3 ], use the function with the fminbnd function to compute the value of ? that minimizes the area ?. What is the corresponding value of the height โ„Ž? Investigate the sensitivity of the solution by plotting ? versus ?. How much can ? vary about its optimal value before the area increases 10 percent above its minimum value? All plots must be formatted and labelled. The output shall be user-friendly.
my code:
%% Q11
clc;clear
global V
V = 10;
minr = fminbnd(@areaR,0,10),
minh = (3*V/(pi*minr^2)),
minA = areaR(minr),
r = 1:0.1:5;
A = areaR(r);
plot(r,A);
xlabel('r');
ylabel('Area');
Ua = minA+0.1*minA;
Lr = r(A < Ua & A >minA);
Range_r = max(Lr) - min(Lr)
  ๋Œ“๊ธ€ ์ˆ˜: 1
John D'Errico
John D'Errico 2019๋…„ 11์›” 6์ผ
You need to start with writing a FUNCTION. This is a script. It does not take any argument at all. So start by learning how to write and use functions.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Image Processing Toolbox์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

Community Treasure Hunt

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

Start Hunting!

Translated by