Optimization: principles and algorithms, by Michel Bierlaire
run0908quad.m
Go to the documentation of this file.
1 %> \file
2 %> Runs example 9.8 with the direct method (algorithm 9.1).
3 %>
4 %> @ingroup Running
5 %> @ingroup chap09
6 %> @author <a href="http://people.epfl.ch/michel.bierlaire">Michel Bierlaire</a>
7 %> @date Sun Apr 6 11:27:07 2014
8 
9 %> @note Calls \ref quadraticDirect
10 
11 Q = [1 1 1 1 ; 1 2 2 2 ; 1 2 3 3 ; 1 2 3 4] ;
12 b = [-4 ; -7 ; -9 ; -10 ] ;
13 printf("Solution provided by Algorihm 9.1: \n")
14 solution = quadraticDirect(Q,b)
15 
16 % With Octave, this can be solved directly using the following statement
17 printf("Solution provided by Octave: \n")
18 solution = Q \ -b
19 
function quadraticDirect(in Q, in b)
Applies the direct resolution method to solve where and .
Copyright 2015-2018 Michel Bierlaire