how can store multiple value in a matrix??

1 次查看(过去 30 天)
hello everyone, I am new in matlab and I need help. in my program below, I am trying to merge two classifiers and I want to store the value of the varaible class_fusion in a matrix for each value of i. How can do it please ??
%%%%%%%%programme prinipale%%%%%%%
ncadre=15;
nbclasse=1000;
load('D:\Documents\MATLAB\classifieur1.mat');
load('D:\Documents\MATLAB\classifieur2.mat');
produit=classifieur1.*classifieur2;
[proba,order]=sort(produit,2,'descend');
for i=1:nbclasse
teta=order(i,[1:ncadre])
prob1=classifieur1(i,[teta])
prob2=classifieur2(i,[teta])
[m1]=mass(prob1,ncadre);
[m2]=mass(prob2,ncadre);
comb_mass=main([m1' m2'],1);
class_fusion=decision(comb_mass',4)
end

采纳的回答

David Sanchez
David Sanchez 2015-5-12
ncadre=15;
nbclasse=1000;
load('D:\Documents\MATLAB\classifieur1.mat');
load('D:\Documents\MATLAB\classifieur2.mat');
produit=classifieur1.*classifieur2;
[proba,order]=sort(produit,2,'descend');
% INITIALIZE YOUR DATA MATRIX
class_fussion = zeros(nbclasse,1);
for i=1:nbclasse
teta=order(i,[1:ncadre])
prob1=classifieur1(i,[teta])
prob2=classifieur2(i,[teta])
[m1]=mass(prob1,ncadre);
[m2]=mass(prob2,ncadre);
comb_mass=main([m1' m2'],1);
% SAVE YOUR DATA INTO THE MATRIX
class_fusion(i) = decision(comb_mass',4)
end
  1 个评论
Sahar abdalah
Sahar abdalah 2015-5-12
thanks for your response and if I want to save also the variable comb_mass and teta, how can do it?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by