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

Rik
Rik 2017년 11월 7일
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?

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2017년 11월 7일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

질문:

2017년 11월 7일

답변:

2017년 11월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by