Contour Plot Edge Issue

I am attempting to plot temperature at different locations in an x-z crosssection. For some reason the contour plot seems to have issues handling the edge of the plot where the contour lines end. Here is a picture of what it looks like when I try to plot just one contour line:
Anyone know how to fix this issue?

5 件のコメント

darova
darova 2020 年 4 月 7 日
Where is the code?
Brendan Whalen
Brendan Whalen 2020 年 4 月 7 日
Sorry here it is:
matrix contains the x,z, and temperature values
XD = matrix(:,1);
ZD = matrix(:,2);
tempD = matrix(:,3);
[X,Z] = meshgrid(XD,ZD);
B=griddata(XD,ZD,tempD,X,Z);
contour(X,Z,B,[1673.15,1673.15])
darova
darova 2020 年 4 月 7 日
Where is data?
Brendan Whalen
Brendan Whalen 2020 年 4 月 7 日
編集済み: darova 2020 年 4 月 7 日
Its a little complicated which is why i did not include it, but here is how I create the matrix:
matrix = [];
for val = 1:length(xarray)
for val2 =1:length(zarray)
x = xarray(val);
w = x-v*tPrime;
xDLess = v*w/(2*a);
z = zarray(val2);
y = 0;
yDLess = v*y/(2*a); % dimensionless y distance
zDLess = v*z/(2*a); % dimensionless z distance
upper = v^2*tPrime/(2*a);
theta = n/(2*pi)^(1/2)*integral(@(tau)fun(tau, xDLess, yDLess, zDLess), 0, upper);
realT = theta*(Tc-To)+To;
alpha = [x -1*z realT];
matrix = [matrix;alpha];
end
end
darova
darova 2020 年 4 月 7 日
How am i supposed to run this code without these?
Use code button

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeContour Plots についてさらに検索

質問済み:

2020 年 4 月 7 日

コメント済み:

2020 年 4 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by