UNISA
MATH 101
ASSIGNMENT 3 SEMESTER 2
YEAR 2023/2024
, Question 1
>> rand("state",623039100919); %return nothing
>> rand(1)
ans = 0.67853
Question 2
ctype = UUUUU
>> lb = [200 100 100 100 100];
>> ub = [500 300 300 300 300];
>> s = -1;
>> b = [24000 24000 24000 24000 15000]'
b=
24000
24000
24000
24000
15000
>> vartype = "CCCCC";
>> A = [10 15 21 26 33;
15 20 25 21 28;
10 16 20 28 30;
12 20 20 25 29;
5 5 8 10 15];
>> C = [120 150 235 300 350]';
>> [xmax,Lmax] = glpk(C,A,b,lb,ub,ctype,vartype,s)
xmax =
385.12
100.00
This study source was downloaded by 100000831973996 from CourseHero.com on 09-14-2023 06:00:58 GMT -05:00
https://www.coursehero.com/file/54705727/assignment3-semester-2pdf/
MATH 101
ASSIGNMENT 3 SEMESTER 2
YEAR 2023/2024
, Question 1
>> rand("state",623039100919); %return nothing
>> rand(1)
ans = 0.67853
Question 2
ctype = UUUUU
>> lb = [200 100 100 100 100];
>> ub = [500 300 300 300 300];
>> s = -1;
>> b = [24000 24000 24000 24000 15000]'
b=
24000
24000
24000
24000
15000
>> vartype = "CCCCC";
>> A = [10 15 21 26 33;
15 20 25 21 28;
10 16 20 28 30;
12 20 20 25 29;
5 5 8 10 15];
>> C = [120 150 235 300 350]';
>> [xmax,Lmax] = glpk(C,A,b,lb,ub,ctype,vartype,s)
xmax =
385.12
100.00
This study source was downloaded by 100000831973996 from CourseHero.com on 09-14-2023 06:00:58 GMT -05:00
https://www.coursehero.com/file/54705727/assignment3-semester-2pdf/