help with a heat map

50 ビュー (過去 30 日間)
Camila
Camila 2025 年 10 月 27 日 6:08
回答済み: Mathieu NOE 2025 年 10 月 28 日 8:32
Hello, I have been trying to create a heat map with the following characteristics: variation of the magnitude of the increase in vertical effort in a mesh every 1 cm for point, linear, and distributed rectangular loads. I am a civil engineer and hope you can help me.heat map
  1 件のコメント
Mathieu NOE
Mathieu NOE 2025 年 10 月 27 日 8:40
hello
can you share your data / code - or a sketch / image / publication of what you want to achieve ?

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

回答 (3 件)

Cris LaPierre
Cris LaPierre 2025 年 10 月 27 日 13:18
You either need a matrix of data corresponding to every point in your grid, or vectors corresponding to the x and y locations, along with their magnitude. This should include a value for every location.
x = [1 2 3 4];
y = [1 2 3];
% len(y) = # rows in Z
% len(x) = # columns in Z
Z = rand(length(y),length(x));
heatmap(x,y,Z)

Sam Chak
Sam Chak 2025 年 10 月 27 日 16:23
Perhaps this heatmap will help you to understand the data visually. In the strictest definition, a heatmap is a tabular representation in grid form where numerical values are visualized using colors instead of numbers. If your table or grid contains NaN values to represent missing data, the colors of the affected cells will be darkened.
x = [1 2 3 4];
y = [1 2 3];
[X, Y] = meshgrid(x, y);
z = X.*Y;
figure(1)
h1 = heatmap(x, y, z);
figure(2)
h2 = heatmap(x, y, z);
h2.CellLabelColor = 'none'; % Turn off numerical display

Mathieu NOE
Mathieu NOE 2025 年 10 月 28 日 8:32
hello
there are a couple of interesting Fex submission :
and probably many others ...

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by