I calculated the function of interest $f(x,y)$ numerically in Mathematica. For consistency, I want to use Matlab for plotting.
I exported my function in the matrix form:
test =
-1.0000 -1.0000 -0.4864
-1.0000 -0.6000 -0.2804
-1.0000 -0.2000 -0.0462
-1.0000 0.2000 -0.0462
-1.0000 0.6000 -0.2804
-1.0000 1.0000 -0.4864
-0.6000 -1.0000 -0.2997
-0.6000 -0.6000 -0.1526
-0.6000 -0.2000 0.1118
-0.6000 0.2000 0.1118
-0.6000 0.6000 -0.1526
-0.6000 1.0000 -0.2997
-0.2000 -1.0000 -0.1809
-0.2000 -0.6000 -0.0939
-0.2000 -0.2000 -0.0046
-0.2000 0.2000 -0.0046
-0.2000 0.6000 -0.0939
-0.2000 1.0000 -0.1809
0.2000 -1.0000 -0.1809
0.2000 -0.6000 -0.0939
0.2000 -0.2000 -0.0046
0.2000 0.2000 -0.0046
0.2000 0.6000 -0.0939
0.2000 1.0000 -0.1809
0.6000 -1.0000 -0.2997
0.6000 -0.6000 -0.1526
0.6000 -0.2000 0.1118
0.6000 0.2000 0.1118
0.6000 0.6000 -0.1526
0.6000 1.0000 -0.2997
1.0000 -1.0000 -0.4864
1.0000 -0.6000 -0.2804
1.0000 -0.2000 -0.0462
1.0000 0.2000 -0.0462
1.0000 0.6000 -0.2804
1.0000 1.0000 -0.4864
So that test is 36x3 matrix, where the columns are x, y and f(x,y). Now I need to contour plot it.
However, it is not in the form of meshgrid. Any thoughts, how to quickly convert it in the form that can be plotted by contour function?
meshgridform? Why not just docontour(f)? - Suevery,x,f(x,y)? - Andras Deakcontour(test(:,2),test(:,1),test(:,3))? - Andras Deak