Advertisement
makispaiktis

Optimization - Linear - Intlinprog

Nov 1st, 2022 (edited)
1,479
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.22 KB | None | 0 1
  1. clear all
  2. close all
  3. clc
  4.  
  5. %% Intlinprog for: min (8x_1 + x_2)
  6. f = [8; 1];
  7. intcon = 2;                 % Means x2 is integer
  8. A = [-1 -2; -4 -1; 2 1];
  9. b = [14; -33; 20];
  10. [x_opt, f_min] = intlinprog(f, intcon, A, b)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement