NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

function [a,d] = dwt(x,varargin)
%DWT Single-level discrete 1-D wavelet transform.
% DWT performs a single-level 1-D wavelet decomposition
% with respect to either a particular wavelet ('wname',
% see WFILTERS for more information) or particular wavelet filters
% (Lo_D and Hi_D) that you specify.
%
% [CA,CD] = DWT(X,'wname') computes the approximation
% coefficients vector CA and detail coefficients vector CD,
% obtained by a wavelet decomposition of the vector X.
% 'wname' is a string containing the wavelet name.
%
% [CA,CD] = DWT(X,Lo_D,Hi_D) computes the wavelet decomposition
% as above given these filters as input:
% Lo_D is the decomposition low-pass filter.
% Hi_D is the decomposition high-pass filter.
% Lo_D and Hi_D must be the same length.
%
% Let LX = length(X) and LF = the length of filters; then
% length(CA) = length(CD) = LA where LA = CEIL(LX/2),
% if the DWT extension mode is set to periodization.
% LA = FLOOR((LX+LF-1)/2) for the other extension modes.
% For the different signal extension modes, see DWTMODE.
%
% [CA,CD] = DWT(...,'mode',MODE) computes the wavelet
% decomposition with the extension mode MODE you specify.
% MODE is a string containing the extension mode.
%
% Example:
% x = 1:8;
% [ca,cd] = dwt(x,'db1','mode','sym')
%
% See also DWTMODE, IDWT, WAVEDEC, WAVEINFO.

% M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 12-Mar-96.
% Last Revision: 06-Feb-2011.
% Copyright 1995-2011 The MathWorks, Inc.
% $Revision: 1.15.4.5 $

% Check arguments.
nbIn = nargin;
error(nargchk(2,7,nbIn,'struct'))
if ischar(varargin{1})
[Lo_D,Hi_D] = wfilters(varargin{1},'d'); next = 2;
else
Lo_D = varargin{1}; Hi_D = varargin{2}; next = 3;
end

% Check arguments for Extension and Shift.
DWT_Attribute = getappdata(0,'DWT_Attribute');
if isempty(DWT_Attribute) , DWT_Attribute = dwtmode('get'); end
dwtEXTM = DWT_Attribute.extMode; % Default: Extension.
shift = DWT_Attribute.shift1D; % Default: Shift.
for k = next:2:nbIn-1
switch varargin{k}
case 'mode' , dwtEXTM = varargin{k+1};
case 'shift' , shift = mod(varargin{k+1},2);
end
end

% Compute sizes and shape.
lf = length(Lo_D);
lx = length(x);

% Extend, Decompose & Extract coefficients.
first = 2-shift;
flagPer = isequal(dwtEXTM,'per');
if ~flagPer
lenEXT = lf-1; last = lx+lf-1;
else
lenEXT = lf/2; last = 2*ceil(lx/2);
end
y = wextend('1D',dwtEXTM,x,lenEXT);

% Compute coefficients of approximation.
z = wconv1(y,Lo_D,'valid');
a = z(first:2:last);

% Compute coefficients of detail.
z = wconv1(y,Hi_D,'valid');
d = z(first:2:last);
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.