# Plotting continuous wavelet in 3D

조회 수: 15 (최근 30일)
Giovanni 2015년 6월 30일
답변: Christopher McCausland 2023년 6월 25일
Hello everybody,
I am working with wavelets since a very short time, and I have a very basic question that I am not able to figure out myselfs. In matlab the cwt command is computing the continuous wavelet transform of a sequence:
scales = (1:2^lev);
cwt(signal, scales, wname, 'plot');
when doing this, I get a nice 2D plot, but what if I would like to plot the typical 3D (time, scale, amplitude) plot of the wavelet transform? How can I obtain this?
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Gali Amoolya 2019년 6월 5일
Hey,
I am also stuck up with the same problem. Could you get the solution to this after it? If yes, please help me.

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

### 답변 (2개)

Raghunandan V 2019년 6월 6일
Hi,
I dont know about cwt command. My idea would be to store the values obtained from cwt command in to 2 variables and then use surf command to plot it in 3d by adding another variable.
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Humberto Merizalde 2020년 4월 13일
Could you please write an example.

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

Christopher McCausland 2023년 6월 25일
I am very late to the party, but for anyone looking a fuller answer to this, it can be found on the tfridge() documentation page, under 'Find Ridge of Noisy Signal'. The following code is lifted directly from the matlab documentation:
% Create a matrix that resembles a time-frequency matrix with a sharp ridge.
% Visualize the matrix in three dimensions.
t = 0:0.05:10;
f = 0:0.2:8;
rv = 1;
[F,T] = ndgrid(f,t);
S = zeros(size(T));
S(abs((F-4)-cos((T-6).^2))<0.1) = rv;
mesh(T,F,S)
view(-30,60)
% Add noise to the matrix and redisplay the plot.
S = S+rand(size(S))/10;
mesh(T,F,S)
view(-30,60)
xlabel('Time')
ylabel('Frequency')
Surf, or Mesh can be use to make these types of 3d graphs, an the viewpoint set to an isometric position so you can really explain what you are doing. Looks very nice for papers.
I hope this helps,
Chrisopher

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

### 카테고리

Help CenterFile Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by