can anybody please tell me the use of 'val' function in this program.., it is not a valid function,yet the program can't be executed without using this,or by changing the function name.
Show older comments
% Load original 1D signal.
clc;
clear all;
close all;
ELEVATED=[]
[fname path]=uigetfile('*.mat');
fname=strcat(path,fname);
load(fname );
z=zeros(100,1);
A=val(1,:)
v1=val(1,:)-val(1,1)
A=v1
A=A'
zc=A(1)
A=[z;A;z]
% s = A(1:1:400);
s = A;
ls = length(s);
figure(1)
plot(s);
title('Actual Signal'),grid on
[c,l]=wavedec(s,4,'db4');
ca1=appcoef(c,l,'db4',1);
ca2=appcoef(c,l,'db4',2);
ca3=appcoef(c,l,'db4',3);
ca4=appcoef(c,l,'db4',4);
figure(2)
plot(c),title('decomposed signal'),grid on
figure(3)
subplot(2,2,1)
plot(ca1),title('1st level reconstructed'),grid on
subplot(2,2,2)
plot(ca2),title('2nd level reconstructed'),grid on
subplot(2,2,3)
plot(ca3),title('3rd level reconstructed'),grid on
subplot(2,2,4)
plot(ca4),title('4th level reconstructed'),grid on
Accepted Answer
More Answers (1)
Walter Roberson
on 19 Mar 2013
0 votes
In the above, "val" is not a function: it is a variable being loaded from the .mat file.
Categories
Find more on Continuous Wavelet Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!