I have a function f = x^2-2xy+y^2, this is the result of 3 2 by 2 matrices after I calculated that by hand. I know how to contour plot with a given function like f. If I have multiple n by m matrices, how do plot them in matlab without calculating them to get f.
Such as, A = [1 0;-1 1; 0 -1]; D = [1 0 0;0 2 0; 0 0 4]; then I will have f = [x y]^TA^TDA[x y]. The only way I know is f=@(x,y) [x,y].'A^TDA[x,y], but this gives me an error since the dimensions don't agree.
Is there a way to do this? Thanks
T? Give an examplex,T, andD. With an examplef. - user1543042