Info

この質問は閉じられています。 編集または回答するには再度開いてください。

File Upload Question Problem Statement: Using MATLAB, solve a linear programming problem for a diet plan. The objective is to minimize the total cost of food while meeting th

1 回表示 (過去 30 日間)
Suhimol
Suhimol 2025 年 11 月 10 日
閉鎖済み: John D'Errico 2025 年 11 月 10 日

File Upload Question Problem Statement:

Using MATLAB, solve a linear programming problem for a diet plan. The objective is to minimize the total cost of food while meeting the required daily intake of nutrients.

Objective Function:

Minimize total cost: Z = 2x + 3y

where x is the number of units of Food A, and y is the number of units of Food B.

Constraints:

3x + 2y >= 15 (Minimum protein requirement)

x + 3y >= 10 (Minimum carbohydrate requirement)

x >= 0, y >= 0 (Non-negativity constraints)

Write a MATLAB code that uses the linprog function to solve this linear programming problem and find the optimal solution.

Note: Upload the file in PDF format and ensure the file size does not exceed 50 MB.

  1 件のコメント
Torsten
Torsten 2025 年 11 月 10 日
Where did you get stuck when you tried to define the inputs for linprog ( f , A , b , Aeq , beq , lb , ub ) to solve your problem ?

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by