Trouble with Stockwell function - basics.
Afficher commentaires plus anciens
Hi Folks,
I'm a novice and trying to run the dost2_tutorial.m script. when a simply copy and paste the script into matlab, I get an error called: Error in StockWellTutorial (line 76)
dost2_test_signal = dost2(test_signal). I have made this in bold font below - this is my line 76
Line 76 is referenced as I have other code in the script file but it is all % out so is not active.
Can anyone help me identify why I get this error. I have copied the tutorial code directly from the MatLab web site below. It can also be found at: https://www.mathworks.com/matlabcentral/fileexchange/47223-2-dimensional-dost-zip?focused=3830320&tab=function
Much appreciated if anyone can offer some guidance.
Ricky
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% dost2_tutorial (script)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% this script shows how to apply the dost2 and the idost2 to images.
% For more informations on the dost2 and the idost2 see the comments
% on their code.
%
% Code by: U. Battisti and L. Riba
% July, 02 2014
%
% References:
% [1] R.G. Stockwell, "Why use the S-Transform", Pseudo-differential
% operators partial differential equations and time-frequency
% analysis, vol. 52 Fields Inst. Commun., pages 279--309,
% Amer. Math. Soc., Providence, RI 2007;
% [2] R.G. Stockwell, "A basis for efficient representation of the
% S-transform", Digital Signal Processing, 17: 371--393, 2007;
% [3] Y. Wang and J. Orchard, "Fast-discrete orthonormal
% Stockwell transform", SISC: 31:4000--4012, 2009;
% [4] Y. Wang, "Efficient Stockwell transform with applications to
% image processing", PhD thesis, University of Waterloo,
% Ontario Canada, 2011;
% [5] U. Battisti, L.Riba, "Window-dependent bases for efficient
% representation of the Stockwell transform", 2014
% http://arxiv.org/abs/1406.0513.
%
%
% Additional details:
% Copyright (c) by U. Battisti and L. Riba
% $Revision: 1.0 $
% $Date: 2014/07/02 $
%
%
% Summary:
% 1) read an image (we use the classical "Lena");
% 2) compute the dost coefficients of the signal;
% 3) compute the inverse dost of the dost to reconstruct the signal;
% 4) plot the signal, the dost coefficients and the reconstructed signal.
clear all
close all
% read the test-signal
test_signal = double(imread('lena.bmp'));
% compute the dost coefficients of the signal "test_signal"
dost2_test_signal = dost2(test_signal);
% reconstruct the signal using the idost2
reconstructed_test_signal = idost2(dost2_test_signal);
figure
subplot(1,3,1)
imagesc(test_signal)
title('test signal')
axis equal
axis tight
subplot(1,3,2)
%imagesc(log(abs(dost2_test_signal)))
imagesc([-.5 .5], [-.5 .5], log(abs(dost2_test_signal)))
title('(log of the norm of the) dost2 of the test signal')
axis equal
axis tight
subplot(1,3,3)
imagesc(real(reconstructed_test_signal))
title('reconstructed test signal')
axis equal
axis tight
colormap gray
1 commentaire
Riccardo Chianese
le 17 Juin 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Multirate Signal Processing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!