Continuous Wavelet 2D Plot Help.

조회 수: 1 (최근 30일)
Abdullah Irfan
Abdullah Irfan 2021년 5월 7일
댓글: Abdullah Irfan 2021년 5월 7일
I have data of in the form of Matrix, the period is 30 and month range is of 12, I want to plot it in Continuous Wavelet 2D Plot. I followed this link but couldn't actually get it working, Kindly help me in generating it.
Sample data is:
1 23 23
2 56 98
3 12 12
4 65 65
5 89 89
6 52 52
7 41 45
8 36 36
9 98 98
10 74 74
11 22 98
12 3 3
13 36 36
14 45 78
15 12 12
16 3 3
17 5 23
18 8 36
19 7 7
20 1 1
21 6 89
22 1 1
23 1 1
24 6 6
25 9 9
26 98 98
27 4 4
28 4 4
29 6 6
30 9 9
31 6 6
The type of image I am expecting is this:
  댓글 수: 1
Abdullah Irfan
Abdullah Irfan 2021년 5월 7일
Any one who can help on this???

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

답변 (1개)

KSSV
KSSV 2021년 5월 7일
Let A be your data matrix.
%% Structured grid
x = A(:,1) ;
y = A(:,2) ;
z = A(:,3) ;
nx = length(unique(x)) ;
ny = length(unique(y)) ;
X = reshape(x,nx,ny) ;
Y = reshape(y,nx,ny) ;
Z = reshape(z,nx,ny) ;
pcolor(X,Y,Z)
%% unstructured grid
x = A(:,1) ;
y = A(:,2) ;
z = A(:,3) ;
m = 100 ;n = 100 ;
x = linspace(min(x),max(x),m) ;
y = linspace(min(y),max(y),n) ;
[X,Y] = meshgrid(x,y,z,X,Y) ;
pcolor(X,Y,Z)
  댓글 수: 3
KSSV
KSSV 2021년 5월 7일
I have given you two methods....try the other one....If not attach your complete data.
Abdullah Irfan
Abdullah Irfan 2021년 5월 7일
Yes dear, but both didn't work, as for second one X and Y variables are extra, meshgrid only accepts 3 variables.
As for complete data, its here:
1 23 23 23 23 23 23 23 23 23 23 23 23 23
2 56 98 56 98 56 98 56 98 56 98 56 98 56
3 12 12 12 12 12 12 12 12 12 12 12 12 12
4 65 65 65 65 65 65 65 65 65 65 65 65 65
5 89 89 89 89 89 89 89 89 89 89 89 89 89
6 52 52 52 52 52 52 52 52 52 52 52 52 52
7 41 45 41 45 41 45 41 45 41 45 41 45 41
8 36 36 36 36 36 36 36 36 36 36 36 36 36
9 98 98 98 98 98 98 98 98 98 98 98 98 98
10 74 74 74 74 74 74 74 74 74 74 74 74 74
11 22 98 22 98 22 98 22 98 22 98 22 98 22
12 3 3 3 3 3 3 3 3 3 3 3 3 3
13 36 36 36 36 36 36 36 36 36 36 36 36 36
14 45 78 45 78 45 78 45 78 45 78 45 78 45
15 12 12 12 12 12 12 12 12 12 12 12 12 12
16 3 3 3 3 3 3 3 3 3 3 3 3 3
17 5 23 5 23 5 23 5 23 5 23 5 23 5
18 8 36 8 36 8 36 8 36 8 36 8 36 8
19 7 7 7 7 7 7 7 7 7 7 7 7 7
20 1 1 1 1 1 1 1 1 1 1 1 1 1
21 6 89 6 89 6 89 6 89 6 89 6 89 6
22 1 1 1 1 1 1 1 1 1 1 1 1 1
23 1 1 1 1 1 1 1 1 1 1 1 1 1
24 6 6 6 6 6 6 6 6 6 6 6 6 6
25 9 9 9 9 9 9 9 9 9 9 9 9 9
26 98 98 98 98 98 98 98 98 98 98 98 98 98
27 4 4 4 4 4 4 4 4 4 4 4 4 4
28 4 4 4 4 4 4 4 4 4 4 4 4 4
29 6 6 6 6 6 6 6 6 6 6 6 6 6
30 9 9 9 9 9 9 9 9 9 9 9 9 9
31 6 6 6 6 6 6 6 6 6 6 6 6 6
The type of output (yes it won't be exact image but it should have overview of like this image with scale next to it).
BTW Thanks a lot for your quick responses.

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

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by