MATLAB: Volume/Surface Area of Paper Cup

In summary: You also need to use the proper units for all your variables. Secondly, your equation for surface area needs to be in terms of square meters, not square inches. Finally, your variables need to be properly named.
  • #1
malindenmoyer
31
0
A paper cup shpaed as a frustum of a cone with [tex]R_2=1.3R_1[/tex] is designed to have a volume of 240 cm3. Determine [tex]R_1[/tex] and height [tex]h[/tex]of the cup such that the least amount of paper will be used for making the cup.

The problem must be done in MATLAB, so please keep that in mind. We have learned commands such as feval, fminbnd, syms, and function handles...all of which I think could be applicable to the problem.
 
Last edited:
Physics news on Phys.org
  • #2
Show us the MATLAB code you have written. You won't get much help until you try something first.
 
  • #3
I am not particularly sure if this is even how you start the problem, but this is what I have done so far.

Code:
syms R1 h;
R2=1.3*R1;
V=(pi*h)/3*(R1^2+R2^2+R1*R2)-240;
S=pi*(R1+R2)*sqrt((R2-R1)^2+h^2)+pi*R1^2;

I know that I could solve for [tex]h[/tex] using the Volume equation, and then have the Surface Area equation in terms of one variable essentially, as R2 is defined by R1; my thought process is such that I would take the new Surface Area equation (in terms of only R1) and take its derivative to find the critical points. This would give me R2 and then I could solve for h. Is this the right process?

Per LCKurtz's request, the two formulas I used to write the above code were the following:
[tex]V=\frac{1}{3}\pi h(\left R_1^2+R_2^2+R_1R_2)\right[/tex]
[tex]S=\pi(R_1+R_2)\sqrt{(\left R_2-R_1)\right^2+h^2}+\pi R_1^2[/tex]
 
Last edited:
  • #4
malindenmoyer said:
I am not particularly sure if this is even how you start the problem, but this is what I have done so far.

Code:
syms R1 h;
R2=R1/3;
V=(pi*h)/3*(R1^2+R2^2+R1*R2)-240;
S=pi*(R1+R2)*sqrt((R2-R1)^2+h^2)+pi*R1^2;

I know that I could solve for [tex]h[/tex] using the Volume equation, and then have the Surface Area equation in terms of one variable essentially, as R2 is defined by R1; my thought process is such that I would take the new Surface Area equation (in terms of only R1) and take its derivative to find the critical points. This would give me R2 and then I could solve for h. Is this the right process?

I don't use Matlab, but still...in your statement of the problem you give R2 = 1.3R1. Then in your code you put R2 = R1/3. Which is it? You need to be more careful.

For starters, your equation for volume needs to be just that, an equation, not a function.
 

1. What is MATLAB?

MATLAB is a programming language and numerical computing environment commonly used in scientific and engineering fields. It allows for data manipulation, visualization, and algorithm development.

2. How can I calculate the volume of a paper cup using MATLAB?

To calculate the volume of a paper cup using MATLAB, you can use the following formula: V = π * (d/2)^2 * h, where V is the volume, d is the diameter of the cup, and h is the height of the cup. You can also use the built-in function "cylinder" in MATLAB to calculate the volume of a cylinder.

3. Can I also calculate the surface area of a paper cup using MATLAB?

Yes, you can calculate the surface area of a paper cup using MATLAB. You can use the formula: A = 2π * (d/2)^2 + π * d * h, where A is the surface area, d is the diameter of the cup, and h is the height of the cup. Alternatively, you can use the built-in function "cylinder" in MATLAB and then use the "surfacearea" function to calculate the surface area.

4. Can I visualize the volume and surface area of a paper cup using MATLAB?

Yes, you can use MATLAB's plotting and visualization tools to create 3D graphs of the volume and surface area of a paper cup. You can also use the "surf" function to create a surface plot of the cup.

5. Is there a built-in function in MATLAB for calculating the volume/surface area of a paper cup?

No, there is not a specific built-in function in MATLAB for calculating the volume or surface area of a paper cup. However, you can use the "cylinder" function and other mathematical formulas to calculate these values. Additionally, there are also user-created functions or scripts available online that can perform these calculations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
33
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
5K
  • Classical Physics
Replies
33
Views
2K
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
11K
  • Calculus and Beyond Homework Help
Replies
4
Views
10K
  • Precalculus Mathematics Homework Help
Replies
3
Views
6K
Back
Top