Files
cmdla/Lessons/10-04/plotQ.m
2024-07-30 14:43:25 +02:00

12 lines
212 B
Mathematica

function plotQ( Q , q , range )
f = @(x,y) 0.5 * [ x y ] * Q * [ x ; y ] + q' * [ x ; y ];
warning( 'off' , 'all' );
fcontour( f , range , 'LineColor' , 'k' , 'LineWidth' , 1 );
warning( 'on' , 'all' );
end