## simplex1
function retval=simplex1()
a=[-60 -50 0 0 0;2 4 1 0 80;3 2 0 1 60]
[n,m]=size(a);
n
m
1
a(1,:)
2
a(2,:)
3
a(3,:)
## n line m column
critical_column=1;
critical_row=1;
y_critical=1.0;
xmax=9.99e30;
ymax=9.99e30;
## find critical column
for i=1:m
    if a(1,i)<xmax
      xmax=a(1,i);
      critical_column=i;
    endif
endfor
for j=2:n
  if(a(critical_column,j)/a(j,n)<ymax)
    ymax=a(critical_column,j)/a(j,n);
    critical_row=j;
    y_critical=a(critical_column,j);
  endif
endfor
xmax
critical_column
critical_row
y_critical
endfunction
