フィルターのクリア

How to reshape values to use meshgrid and pdeplot

3 ビュー (過去 30 日間)
Patrick Frey
Patrick Frey 2024 年 4 月 3 日
コメント済み: Cris LaPierre 2024 年 4 月 5 日
Hello, I want to use pdeplot. I have x-,y-coordinates and values for different timesteps. How must the values be transformed to use pdeplot?
data = [1, 1, 1, 20, 21, 22, 23;
1, 1, 2, 25, 26, 27, 28;
1, 2, 1, 30, 31, 32, 33;
1, 2, 2, 35, 36, 37, 38;
2, 1, 1, 40, 41, 42, 43;
2, 1, 2, 45, 46, 47, 48;
2, 2, 1, 50, 51, 52, 53;
2, 2, 2, 55, 56, 57, 58];
x = unique(data(:, 1)); % x-coordinates
y = unique(data(:, 2)); % y-coordinates
temperature = data(:, 3:end); % temperature
% meshgrid form the coordinates
[X, Y] = meshgrid(x, y);
  5 件のコメント
Patrick Frey
Patrick Frey 2024 年 4 月 5 日
編集済み: Patrick Frey 2024 年 4 月 5 日
I would likte to plot the temperture of a solid geometry defined by the coordinates..
Something like this
T = thermalresults.Temperature;
msh = thermalresults.Mesh;
pdeplot(msh,XYData=T(:,10),Contour="off",ColorMap="jet")
Cris LaPierre
Cris LaPierre 2024 年 4 月 5 日
It looks like you have a 3d object, not 2D. That means there are 4 temperatures associated with each point. How are we to interpret those 4 temperatures? Do they represent tempurature over time? If so, which ones shoudl be used for creating the plot?
Consider looking at the following examples

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeneral PDEs についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by