How to convert class cell to vector?
wavelet = ‘db4’;
level = 6;
tt=0:(0.25*10^(-3)):(0.25*10^(-3))*ceil(N);
ref=cos(2*pi*50*tt);
[CR, LR] = wavedec(CurrentwindowR, level, wavelet);
[CY, LY] = wavedec(CurrentwindowY, level, wavelet);
[CB, LB] = wavedec(CurrentwindowB, level, wavelet);
[CRvolt, LRvolt] = wavedec(VoltagewindowR, level, wavelet);
[CYvolt, LYvolt] = wavedec(VoltagewindowY, level, wavelet);
[CBvolt, LBvolt] = wavedec(VoltagewindowB, level, wavelet);
[Cref, Lref] = wavedec(ref, level, wavelet);
coder.extrinsic(‘str2double’)
AppR=str2double(detcoef(CR,LR,level));
AppY=str2double(detcoef(CY,LY,level));
AppB=str2double(detcoef(CB,LB,level));
AppvoltR=str2double(detcoef(CRvolt,LRvolt,level));
AppvoltY=str2double(detcoef(CYvolt,LYvolt,level));
AppvoltB=str2double(detcoef(CBvolt,LBvolt,level));
Appref=str2double(detcoef(Cref,Lref,level));
thetaR= acosd((dot(Appref,AppR))/(norm(Appref)*norm(AppR)));
thetaY= acosd((dot(Appref,AppY))/(norm(Appref)*norm(AppY)));
thetaB= acosd((dot(Appref,AppB))/(norm(Appref)*norm(AppB)));
refR=cos(2*pi*50*tt+thetaR*pi/180);
refY=cos(2*pi*50*tt+thetaY*pi/180);
refB=cos(2*pi*50*tt+thetaB*pi/180);wavelet = ‘db4’;
level = 6;
tt=0:(0.25*10^(-3)):(0.25*10^(-3))*ceil(N);
ref=cos(2*pi*50*tt);
[CR, LR] = wavedec(CurrentwindowR, level, wavelet);
[CY, LY] = wavedec(CurrentwindowY, level, wavelet);
[CB, LB] = wavedec(CurrentwindowB, level, wavelet);
[CRvolt, LRvolt] = wavedec(VoltagewindowR, level, wavelet);
[CYvolt, LYvolt] = wavedec(VoltagewindowY, level, wavelet);
[CBvolt, LBvolt] = wavedec(VoltagewindowB, level, wavelet);
[Cref, Lref] = wavedec(ref, level, wavelet);
coder.extrinsic(‘str2double’)
AppR=str2double(detcoef(CR,LR,level));
AppY=str2double(detcoef(CY,LY,level));
AppB=str2double(detcoef(CB,LB,level));
AppvoltR=str2double(detcoef(CRvolt,LRvolt,level));
AppvoltY=str2double(detcoef(CYvolt,LYvolt,level));
AppvoltB=str2double(detcoef(CBvolt,LBvolt,level));
Appref=str2double(detcoef(Cref,Lref,level));
thetaR= acosd((dot(Appref,AppR))/(norm(Appref)*norm(AppR)));
thetaY= acosd((dot(Appref,AppY))/(norm(Appref)*norm(AppY)));
thetaB= acosd((dot(Appref,AppB))/(norm(Appref)*norm(AppB)));
refR=cos(2*pi*50*tt+thetaR*pi/180);
refY=cos(2*pi*50*tt+thetaY*pi/180);
refB=cos(2*pi*50*tt+thetaB*pi/180); wavelet = ‘db4’;
level = 6;
tt=0:(0.25*10^(-3)):(0.25*10^(-3))*ceil(N);
ref=cos(2*pi*50*tt);
[CR, LR] = wavedec(CurrentwindowR, level, wavelet);
[CY, LY] = wavedec(CurrentwindowY, level, wavelet);
[CB, LB] = wavedec(CurrentwindowB, level, wavelet);
[CRvolt, LRvolt] = wavedec(VoltagewindowR, level, wavelet);
[CYvolt, LYvolt] = wavedec(VoltagewindowY, level, wavelet);
[CBvolt, LBvolt] = wavedec(VoltagewindowB, level, wavelet);
[Cref, Lref] = wavedec(ref, level, wavelet);
coder.extrinsic(‘str2double’)
AppR=str2double(detcoef(CR,LR,level));
AppY=str2double(detcoef(CY,LY,level));
AppB=str2double(detcoef(CB,LB,level));
AppvoltR=str2double(detcoef(CRvolt,LRvolt,level));
AppvoltY=str2double(detcoef(CYvolt,LYvolt,level));
AppvoltB=str2double(detcoef(CBvolt,LBvolt,level));
Appref=str2double(detcoef(Cref,Lref,level));
thetaR= acosd((dot(Appref,AppR))/(norm(Appref)*norm(AppR)));
thetaY= acosd((dot(Appref,AppY))/(norm(Appref)*norm(AppY)));
thetaB= acosd((dot(Appref,AppB))/(norm(Appref)*norm(AppB)));
refR=cos(2*pi*50*tt+thetaR*pi/180);
refY=cos(2*pi*50*tt+thetaY*pi/180);
refB=cos(2*pi*50*tt+thetaB*pi/180); discrete wavelet, detcoef, cell to vector MATLAB Answers — New Questions