Dot indexing is not supported for variables of this type
Show older comments
hello, i have this feature Extraction algorithm but i have error : Dot indexing is not supported for variables of this type
xApp = av_train;
data=xApp (: , 1);
type = 1;
feature=featureExtraction(data,'mean',type);
there is my feature Extraction function, can anyone help me please
function feature=featureExtraction(data,param,type)
%
%Input:
% data:nxm, n:#of patterns, m: number of features
% method:'raw','mean','meanVar'
% window: window length
% type: 1 --- for movtimavg
% 2 --- for windowingLabels
switch param.method
case 'raw', feature = data;
case 'mean'
if (type==1)
feature = movtimavg(data,param.window,param.step);
end
if (type==2)
feature = windowingLabels(data,param.window,param.step);
end
case 'meanVar',feature = movtimavg(data,param.window,param.step,1);
if (type==1)
feature = movtimavg(data,param.window,param.step,1);
end
if (type==2)
feature = windowingLabels(data,param.window,param.step);
end
end
Accepted Answer
More Answers (1)
Image Analyst
on 6 Apr 2022
Edited: Image Analyst
on 6 Apr 2022
Evidently param is not a structure like you thought.
Also
case 'meanVar',feature = movtimavg(data,param.window,param.step,1);
should be on two lines, not one.
2 Comments
Nassim CHERIF
on 6 Apr 2022
Image Analyst
on 7 Apr 2022
Well, put them on different lines.
case 'meanVar'
feature = movtimavg(data,param.window,param.step,1);
Categories
Find more on Matrix Indexing 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!