How to solve for a max area given a set parameter?

I have a class problem which give us 30 one meter thick would panels. We are to write a program that allows us to build a rectangular yard to maximize area of said yard. Below is what I've come up with so far, however the problem I a having is that b and c (the length and width) are undetermined values. Is there a function in which i can set the 30 beams (a) equal to 2(b+c) (the parameter) where b and c together use a max of 30 beams (a)?
a=30;
b+c=a;
b=(a-2*c)/2;
a=2*b+2*c;
d=(b*c);
solve max a

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 2 月 10 日

0 投票

You can use the symbolic toolbox. For example,
syms a b c
C = solve(b+c == 123,c)
a = b*C
now maximize a somehow

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

質問済み:

2016 年 2 月 10 日

回答済み:

2016 年 2 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by