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.

13 ビュー (過去 30 日間)
% 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

採用された回答

Kye Taylor
Kye Taylor 2013 年 3 月 19 日
編集済み: Kye Taylor 2013 年 3 月 19 日
The lines
[fname path]=uigetfile('*.mat');
fname=strcat(path,fname);
load(fname );
will load a .mat file into the scope of MATLAB environment. That .mat file must contain a variable whose name is val. You likely do not have the .mat file in the right place on your machine, if at all.

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 3 月 19 日
In the above, "val" is not a function: it is a variable being loaded from the .mat file.

カテゴリ

Help Center および File ExchangeTransforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by