Homework matlab problem - Determine r1, r2 and surface area - use matrix?

16 次查看(过去 30 天)
ive been staring at this problem and cant get anything. im a college student i dont u see what to do with the unknown variables
the unit we are in now is covering - input and output commands - display commands - fprintf - load commands
help will be greatly appreciated KEEP IT SIMPLE IF POSSIBLE. THIS IS ONLY CHAPTER 4 OF AN INTRO CLASS
an ice cream cone shaped as a frustum of a cone with R2=(1.2)(R1) is designed to have a volume of 1,000 cm cubed. Determine R1, R2 and the surface area , s, of the paper for containers with heights h of 8, 10, 12, 14, and 16 cm. Display the results in a table. The volume of the container, V, and the surface area of the paper are given by
V = (1/3)(pi)(h)(R1^2 + R2^2 + R1R2)
S = (pi)(R1+R2)sqrt[(R2-R1)^2 + h^2] + (pi)(R1^2 + R2^2)
  3 个评论
Morley
Morley 2011-9-28
i understand that it seems i have not put much effort into this problem, but it is 2:30am here and ive got class at 8. i really am trying. my problem is i dont know what to do with the unknown variables so i dont know where to start. the unit we are in now is covering
- input and output commands
- display commands
- fprintf
- load commands
M VENKATESH
M VENKATESH 2021-9-10
A cone shaped cup is designed to have a volume of 250 cm³. Determine the radius, r, of the base and the surface area, S, of the paper for cups with heights, h of 5,6,7,8, and 9 cm. The volume V, and the surface are of the paper are given by: V=1/2pi r²h und S = pi r sqrt(r²+h²). How to put this problem

请先登录,再进行评论。

采纳的回答

UJJWAL
UJJWAL 2011-9-28
Hi Morley.
Below Is a code that solves your problem. Go through each step and understand. I hope it will help. For further details mail back
R1 = sym('R1','positive'); % Define R1 as a symbolic variable . It is positive
R2 = 1.2* R1; % Mention the relation between R1 and R2
table = zeros(5,4); % The table stores the h in the first column . The second column stores R1, the third one stores R2 and the fourth one stores s
table(:,1)=8:2:16; % Store the heights
for i = 1:5
x= solve((1/3)*pi*table(i,1)*(R1.^2 + R2.^2 + R1*R2)- 1000,'R1'); %Solve for the values of R1
table(i,2) = x;
table(i,3) = 1.2*x;
table(i,4) = pi * (1.3*x) *sqrt((0.2*x)^2 + table(i,1)^2) + pi*(x^2 + (1.2*x)^2); % Calcualte the surface area
end
Hope This helps
HAPPY TO HELP
UJJWAL

更多回答(4 个)

Andrei Bobrov
Andrei Bobrov 2011-9-28
EDITED
syms R1 R2 h S positive
r1s = subs([1000 - 1/3*pi*h*(R1^2 + R2^2 + R1*R2),...
pi*(R1+R2)*sqrt((R2-R1)^2 + h^2) + pi*(R1^2 + R2^2)],R2,1.2*R1)
r1s(1) = solve(r1s(1),R1)
f = cell(2,1); for j1 = 1:2, f{j1} = matlabFunction(r1s(j1)); end
h = (8:2:16)';
r1 = f{1}(h);
out = [h,r1,1.2*r1,f{2}(r1,h)]

Jackie Cortez
Jackie Cortez 2016-10-18
Is there a way to do this problem without using syms or subs? It keeps telling me I have to License and install the Symbolic Math Toolbox which I don't have.
  1 个评论
Andrei Bobrov
Andrei Bobrov 2019-2-26
Without Symbolic Math Toolbox:
Veq1000 = @(h,R1)1000 - 1357/356*h.*R1.^2;
s = @(h,R1)(R1*pi.*(61*R1 + 11*(R1.^2 + 25*h.^2).^(1/2)))/25;
h = (8:2:16)';
n = numel(h);
r1 = zeros(n,1);
for ii = 1:n
r1(ii) = fzero(@(R1)Veq1000(h(ii),R1),1);
end
out = [h,r1,1.2*r1,s(h,r1)];

请先登录,再进行评论。


Divya Pateriya
Divya Pateriya 2019-10-17
h = input('Please enter the array of height :');
v=input('please tell the volume of frustum :');
r1 = sqrt((3*v)./(pi*h.*3.64));
r2=(1.2).*r1;
s=pi.*(r1+r2).*sqrt((r2-r1).^2+h.^2)+pi.*(r1.^2+r2.*2);
Result=[h;r1;r2;s];
Table = Result'
  1 个评论
John D'Errico
John D'Errico 2019-10-17
编辑:John D'Errico 2019-10-17
Sigh. This does not display the result in a table. It creates a variable named Table. It only computes the result for ONE value of h, so there is no table created anyway.

请先登录,再进行评论。


dania tr
dania tr 2021-10-27
The surface area A of a sphere depends on its radius r as follows: A = 4 ᴫ r 2 . Write a MATLAB function to compute the surface area. Call your function to compute A at r = 5 and display the result.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by