Error "Unbalanced or unexpected parenthesis or bracket."
Ältere Kommentare anzeigen
Hi, i wanted to minimize my code and i tried this
clc;
clear all;
close all;
load('C:\Users\del.dell-PC\pfe\base de donnée\patient avec crise\chb01_21_edfm.mat')
Fs=256;
result=cell(23,1);
d1=designfilt('lowpassfir','PassbandFrequency',0.45,'StopbandFrequency',0.5,'PassbandRipple',3,'StopbandAttenuation',60,'DesignMethod','equiripple');
for n=1:23
deriv=(val(n,:))/2.559375;
t=(0:length(deriv)-1)/Fs;
result{n} = filtfilt(d1,deriv);
moyenne{n}=mean(result{n},2);
variance{n} = std(result{n},[], 2);
Maximale{n}= max(result{n},[],2);
Minimale{n} = min(result{n},[],2);
[c,l]=wavedec(result{n},4,'db4');
[cd1,cd2,cd3,cd4]=detcoef(c,l,[1,2,3,4]);
cA4=appcoef(c,l,'db4',4);
[Ea,Ed]=wenergy(c,l)
end
[a,b,z,d,e,f,g,h,i,j,k,ll,m,n,o,p,q,r,s,x,u,v,w]=result{:};
But i dont know how to make the result of "Wenergy(c,l)" like
moyenne{n}=mean(result{n},2)
i tried this
energie{n}= [Ea,Ed](result{n},[],2);
but i got this error message "Unbalanced or unexpected parenthesis or bracket".
Can anyone help me please?
Antworten (1)
Walter Roberson
am 19 Mai 2017
I am not at all clear what you are trying to do. Maybe
[Ea, Ed] = wenergy(c,l);
energie{n} = {Ea, Ed};
5 Kommentare
Walter Roberson
am 20 Mai 2017
What are your desired output variables? Some of what you wrote appears to be temporary variables.
Why do you bother to calculate
[cd1,cd2,cd3,cd4]=detcoef(c,l,[1,2,3,4]);
cA4=appcoef(c,l,'db4',4);
for anything other than the very last one, for w ? You throw away all of the results except for that last one.
afef
am 20 Mai 2017
afef
am 20 Mai 2017
Kategorien
Mehr zu AI for Signals and Images finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!