Dot indexing is not supported for variables of this type
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
採用された回答
Scott MacKenzie
2022 年 4 月 6 日
編集済み: Scott MacKenzie
2022 年 4 月 6 日
Change
xApp = av_train;
data=xApp (: , 1);
type = 1;
feature=featureExtraction(data,'mean',type);
to
xApp = av_train;
data=xApp (: , 1);
param.method = 'mean';
param.window = 3; % change window size, as needed
param.step = 2; % change step size, as needed
type = 1;
feature=featureExtraction(data,param,type);
3 件のコメント
Scott MacKenzie
2022 年 4 月 6 日
OK, try the modified code in my answer. I'm not sure what window or step sizes might work for you, however.
その他の回答 (1 件)
Image Analyst
2022 年 4 月 6 日
編集済み: Image Analyst
2022 年 4 月 6 日
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 件のコメント
Image Analyst
2022 年 4 月 7 日
Well, put them on different lines.
case 'meanVar'
feature = movtimavg(data,param.window,param.step,1);
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!