Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Multiplication with for loop (not getting the right results)

2 vues (au cours des 30 derniers jours)
Sukru Yavuz
Sukru Yavuz le 12 Mar 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
for ii=1:4
endfor ii=1:4
deneme{ii,:}= vericell(class==ii,:);
for j = 4:14
deneme{ii}{:,j};
meanres(ii,j) = mean (deneme{ii}{:,j});
stdres(ii,j) = std(deneme{ii}{:,j});
uscalc(ii,j) = (predictioncolumn(j) - meanres(ii,j)) ^2 / (2* (stdres(ii,j)^2));
meancalc(ii,j) = 1/(sqrt(2*pi)* stdres(ii,j)) * (2.71^(uscalc(ii,j))) ;
bolumler{ii,:} = sum(veri.Class==ii)/ length(veri.Class);
*likelihood(ii,j) = meancalc(ii,j) * bolumler {ii}*
end
end
Hello, I am trying to get the multiplication of all columns of i with all rows of ii. For example: meancalc(1,4) * meancalc(1,5) * ... meancalc(1,14) * bolumler{1} And then, meancalc(2,4) * meancalc(2,5) ... meancalc(2,14) * bolumler{2}. Couldn't handle it. Thanks in advance.
Here is what bolumler looks like:
Here is what meancalc looks like:

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by