Simple 2D contour plots
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MS
am 5 Mai 2020
Kommentiert: Ameer Hamza
am 5 Mai 2020
navg = 11;
filenames = cell(navg,1);
for i = 1:navg
filenames = sprintf('queen2_test_%d.dat', i);
mydata{i} = importdata(filenames);
% writematrix(avg_mat{i}, filenames{i});
R = mydata{i}(:,1);%X
C = mydata{i}(:,2);%Y
F = mydata{i}(:,7);%F(X,Y)
figure
contour(R,C,repmat(F,1,numel(C))');%error line
contourf(R, C, F)% error line
end
Please help me to plot and save high quality contour plots for a sequence of files. I am attaching the code and the data files for your reference.
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 5 Mai 2020
Create the meshgrid of R,C,F then plot contour
8 Kommentare
Ameer Hamza
am 5 Mai 2020
@MS, the image you posted is a quiver plot, not a contour plot? Which one do you want? Note that for the quiver plot, you will need 4 input variables instead of 3 needed for contour.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!