필터 지우기
필터 지우기

imagesc from 1D array with coordinates and values

조회 수: 7 (최근 30일)
Abhishek Saini
Abhishek Saini 2020년 5월 4일
댓글: darova 2020년 5월 4일
Hi,
I have 3 vectors and I want to plot a 2D image using mesh/ imagesc/surf command. But How can I convert 1D array to 2D array with accurate coordinate points?
Let's assume, I have
x = [1, 2, 1.4, 2.6,8.9];
y = [8, 5, 6, 2, 8.4,3.5];
amplitude = [0.3, 0.5, 0.9, 1];
Attach is the data. where x = xx, y=yy and amplitude = C;
Thanks

답변 (1개)

darova
darova 2020년 5월 4일
  댓글 수: 2
Abhishek Saini
Abhishek Saini 2020년 5월 4일
My data has size of (300000x1) so I cannot use mesh grid. It will go out of memory.
I found the method.
scatter works for this.
pointsize = 2;
scatter(x,y,pointsize,amplitude);
darova
darova 2020년 5월 4일
ok

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by