线性方程正解

时间:2017-03-28 14:18:16

标签: ios linear algebra

我在IOS有一个营养师应用程序,我需要找到早餐吃的食物量,

问题:

早餐谷物的盒子列出了一份谷物中含有的卡路里数量和蛋白质和脂肪含量。假设我们要准备这三种谷物的混合物,使其含有恰好245卡路里,6克蛋白质和7克脂肪。我们如何制备所需的混合物? (我们应该合并多少份每种谷物?)

 Here I am getting the solutions with negative values , its should be wrong in case of food . So how can find out the soluions with non-negative numbers?. Please help me

问题:

 Cheerios | Cinnamon Toast Crunch | Rice Krispies

卡路里120 130 105

蛋白质(g)4 3 1

脂肪(g)2 5 2

Linear equations are 

120c + 130t + 105r = 245 (calories)
4c + 3t + r = 6 (protein)
2c + 5t + 2r = 7 (fat)

0 个答案:

没有答案
相关问题