Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Multiplication with for loop (not getting the right results)
조회 수: 2 (최근 30일)
이전 댓글 표시
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:

댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!