Heatmap from Array For data set

11 ビュー (過去 30 日間)
Iplaysailing
Iplaysailing 2021 年 4 月 12 日
編集済み: Cris LaPierre 2021 年 4 月 12 日
I have a 100x3 array called result- i am having trouble creating the heatmap for it- i have in the first column the X-grid values, the Second the Y-grid values and third the associated result that should be put into the 10x10 grid.
here is the array i built
Result = [Y(:),X(:),Values(:)];
the x and y are created with ndgrid command

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 4 月 12 日
編集済み: Cris LaPierre 2021 年 4 月 12 日
If you want to keep everything as vectors, you will need to turn your array into a table with at least 3 variables. Then create the heatmap using the following syntax.
You can see an example of this approach here.
There is a similar approach for vectors, but in that case, your cdata must be a matrix and not a vector.
If neither approach is producing the results you want, please provide your data (use the paperclip icon to attach it to your post), a description of why it is wrong, along with any error messages you are getting (all the red text).

カテゴリ

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