-1
我有一個墊數據和提取8功能此文件。 我應該安排此功能作爲一個單元格,並重復12個類別 我想安排和統一此代碼作爲一個代碼?排序嵌套單元格作爲一個排列功能
feature_mean1=zeros(12,15);
for vmean1= 1:12
feature_mean1(vmean1,:)= mean(Catrgoryy1{vmean1});
end
feature_mean2=zeros(12,15);
for vmean2= 1:12
feature_mean2(vmean2,:)= mean(Catrgoryy2{vmean2});
end
%**********************
%***************
feature_min1=zeros(12,15);
for vmin1= 1:12
feature_min1(vmin1,:)= min(Catrgoryy1{vmin1});
end
feature_min2=zeros(12,15);
for vmin2= 1:12
feature_min2(vmin2,:)= min(Catrgoryy2{vmin2});
end
%***************
X=zeros(30,4);
h=1;
X_1=[feature_mean1(1,:)',feature_std1(1,:)',feature_min1(1,:)',feature_max1(1,:)',feature_mean2(1,:)',feature_std2(1,:)',feature_min2(1,:)',feature_max2(1,:)'];%
Y_1=repmat(1,length(X_1),1);
%%%**************222*************
X_2=[feature_mean1(2,:)',feature_std1(2,:)',feature_min1(2,:)',feature_max1(2,:)',feature_mean2(2,:)',feature_std2(2,:)',feature_min2(2,:)',feature_max2(2,:)'];
Y_2=repmat(2,length(X_2),1);
%%%**************333**************
.
.
.
X_12=[feature_mean1(12,:)',feature_std1(12,:)',feature_min1(12,:)',feature_max1(12,:)',feature_mean2(12,:)',feature_std2(12,:)',feature_min2(12,:)',feature_max2(12,:)'];
Y_12=repmat(12,length(X_12),1);
哪裏是你的問題,實施這個?就像你在代碼的上半部分所做的那樣,把它放到一個for循環中。 – Daniel
我做了這個功能的8陣列,但我不能保存在單個單元格 –
對於o = 1:12 Xf(o,:)= [feature_mean11 {o},feature_std11 {o},feature_min11 {o},feature_max11 {o },{feature_mean22ø},{feature_std22ø},{feature_min22ø},{feature_max22ö}]; 結束 –