Colour plot using single x, y and multiple z values

3 ビュー (過去 30 日間)
aa
aa 2020 年 8 月 20 日
編集済み: KSSV 2020 年 8 月 22 日
Hi everyone,
I have data with single x-axis, singel y-axis and multiple z-axis. I want to plot the values of z againts x-y in colour map.
my simple data set is attached (first coloumn is x-axis, 2nd column is y-axis and rest of the colymns are z-axis) here along with the required output plot.

回答 (1 件)

KSSV
KSSV 2020 年 8 月 20 日
num = xlsread("data.xlsx") ;
x = num(:,1) ;
y = num(:,2) ;
Z = num(:,3:end) ;
pcolor(x,y,Z) ;
shading interp ;
colorbar
  2 件のコメント
aa
aa 2020 年 8 月 22 日
Thank you. This works very work and serve the purpose.
KSSV
KSSV 2020 年 8 月 22 日
編集済み: KSSV 2020 年 8 月 22 日
Thank you is accepting the answer..

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by