How to join a double variable and a strucure variable to plot a heat map ?

1 回表示 (過去 30 日間)
Niraj Bal Tamang
Niraj Bal Tamang 2021 年 1 月 27 日
コメント済み: Niraj Bal Tamang 2021 年 1 月 27 日
I have two datasets. One is a structure type (network) and another is double (Count). I want to create a heat map over the network using the values from the Count. I tried to join the variables but couldn't. I also tried converting one of them into another type and then join but the conversion did't worked as well. Can anyone please help me how to deal with this situation?
Thank You

採用された回答

Robert U
Robert U 2021 年 1 月 27 日
編集済み: Robert U 2021 年 1 月 27 日
Dear Niraj Bal Tamang,
According to documentation heatmap() supports tables among others. Working with tables is very convenient since you can create heatmaps concerning specific columns without additional efforts. Your network-variable is a structure array which is easy to convert to table by applying struct2table().
Example:
load('Count.mat');
load('network.mat');
strNetwork = struct2table(network);
heatmap(strNetwork,'GEOLOGY','LANDCOVER');
Kind regards,
Robert

その他の回答 (0 件)

カテゴリ

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