Info

This question is closed. Reopen it to edit or answer.

Multiplication with for loop (not getting the right results)

1 view (last 30 days)
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:

Answers (0)

Community Treasure Hunt

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

Start Hunting!