filled 2D contour plot
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mandar Badve
am 7 Nov. 2017
Beantwortet: Walter Roberson
am 7 Nov. 2017
I want to plot filled 2D contour plots using contourf function. my data is in arranged as x y u v (tab limited n x 4 cells). how do I arrange a data to use function contourf?
1 Kommentar
Rik
am 7 Nov. 2017
Tab delimited sound like a text file, cell sounds like the data type you can covert to a matrix with cell2mat. Which is it? And what have you tried already? What errors are you getting?
Akzeptierte Antwort
Walter Roberson
am 7 Nov. 2017
Read your data and store into x, y, u, v .
uF = scatteredInterpolant(x, y, u);
vF = scatteredInterpolant(x, y, v);
[X, Y] = ndgrid( linspace(min(x), max(x)), linspace(min(y), max(y)));
U = uF(X, Y);
V = vF(X, Y);
subplot(1,2,1);
contourf(X, Y, U);
title('u')
subplot(1,2,2)
contourf(X, U, V);
title('v')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Distribution 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!