fsurf with symbolic variables
Show older comments
I'm trying to plot the eigenvalues of a symbolic 3x3 matrix using the code below:
syms kx ky phi;
assume(kx,'real'); assume(ky, 'real'); assume(phi,'real');
cx = (1+exp(-1i*kx));
cy = (1+exp(-1i*ky));
H0 = [0 cx cy; conj(cx) 0 0; conj(cy) 0 0];
eig0 = eig(H0);
for ie = 1:3
fsurf(eig0(ie),[0,2*pi,0,2*pi],'edgecolor','none'); hold on;
end
hold off
xlabel('k_x/a'); ylabel('k_y/a');

As you can see the resulting plot is terrible,as there are holes everywhere. If I use ezsurf instead it is working fine.
Is it a bug of fsurf or am I missing something?
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!