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

조회 수: 27 (최근 30일)
Morley
Morley 2011년 9월 28일
댓글: Walter Roberson 2021년 10월 27일
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.
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 10월 27일
I do not understand how this information can be used to answer Morley's Question about cones asked in 2011 ?

댓글을 달려면 로그인하십시오.

카테고리

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