using contour plot to solve the problem

Hi I want to use contour plot to find the minimum dimension of a can with the volume of 315, but I don't know how to do it. I'm sorry I'm pretty new to matlab

8 件のコメント

darova
darova 2021 年 3 月 14 日
Can you describe the form of a can? DO you have a picture?
Dai Nguyen
Dai Nguyen 2021 年 3 月 14 日
it has cylindrical shape with closed top
Adam Danz
Adam Danz 2021 年 3 月 14 日
What you mean by minimum dimension? A can has a height and a radius or diamter. How would color be used to find the minimum of those two dimensions?
Dai Nguyen
Dai Nguyen 2021 年 3 月 14 日
I want to reduce the cost for manufacturing the can by reducing the dimension of it, but still keeping the volume. I did the math with derivation and found that in order to minimize the cost the height has to be the same with the radius
Dai Nguyen
Dai Nguyen 2021 年 3 月 14 日
is there any way I can use contour plots to demonstrate it
darova
darova 2021 年 3 月 14 日
I think you need simple surf. Can you show your calculations?
Adam Danz
Adam Danz 2021 年 3 月 14 日
Yes, in the case of derivation, a smooth surface might be better than the 2D grid I suggested in my answer.
Dai Nguyen
Dai Nguyen 2021 年 3 月 16 日

サインインしてコメントする。

回答 (1 件)

Adam Danz
Adam Danz 2021 年 3 月 14 日
編集済み: Adam Danz 2021 年 3 月 15 日

0 投票

I assume you have an n-by-m matrix of costs for n heights and m radii.
I'd use heatmap or imagesc to create a gridded color display where x is can heights, y is radii (or the other way around) and the colorbar defines the cost.

1 件のコメント

Dai Nguyen
Dai Nguyen 2021 年 3 月 16 日
yes it will cost about a quarter to produce 1 meter, the dimension that I calculate to minimize the cost but still keeping the same volume is 4.645m for both height and radius

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeContour Plots についてさらに検索

タグ

質問済み:

2021 年 3 月 14 日

コメント済み:

2021 年 3 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by