Plotting cone of influence in Morlet wavelet power spectrum in MATLAB -


i tried generating cone of influence morlet wavelet power spectrum using following matlab code:

 cone = conofinf('morl',1:365,lensig,[],'plot'); 

however, strange looking shaded area bounded 2 linear lines. doesn't cone of influence morlet wavelet power spectrum.

what did wrong?

i guess wanted output coi @ borders of wavelet transform. in case have specify last parameter non-empty vector, coordinates, need coi computed, e.g.

cone = conofinf('morl',1:365,lensig,[1 lensig],'plot');

i had similar task , here's did:

figure;  % plot wavelet transform / scalogram imagesc(t,scales,wt); axis square; colorbar;  % annotate axes , title title('coefficients of continuous wavelet transform'); xlabel('time (or space) b');  ylabel('scales a');  % cone of influence % here, have specify points @ want calculate coi % last parameter: cone = conofinf(wname,scales,lensig,[1 lensig]); % combine left , right edges cone = [cone{1}(:,floor(1:lensig/2)) cone{2}(:,ceil(lensig/2):end)]; % previous steps give area under coi % can see with: figure; imagesc(cone); % now, want border of area coi  = zeros(1,lensig); idx = 1:lensig     valcoi = find(cone(:,idx)==1,1,'last');     if ~isempty(valcoi)         coi(idx) = f(valcoi);     end end % plot coi border on top of wavelet transform hold on; plot(t,coi,'k','linewidth',1.5); hold off; 

optionally, can hatch area under coi, it's bit of hack , it's not ideal. need hatchfill function (here's example how use it). once have function on path, can use this:

[~,h] = contourf(t,scales,cone*max(wt(:)),[1 1]*max(wt(:))); hpatch = findobj(h, 'type', 'patch'); hh = hatchfill(hpatch, 'cross', 45, 10); 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -