Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how to fix this error matrix dimension must agree

조회 수: 1 (최근 30일)
SARAH LONER
SARAH LONER 2020년 1월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
just look at my attached files
if i take probability of fitness for p1 and p2
p1=0.7 and p2=0.3
where n is number of nodes in wireless sensor network
for i=1:n
Fit = p1|(nerst(:))| + p2 .*sum (resdialenergy(:))
fprintf('fitness value is : %d values.\n', Fit);
end
here im not getting any fitness values it showing empty array for all node. tell me how to solve that
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 1월 22일
If you have an emergency you should contact ambulance or fire department or police. We are unable to provide emergency assistance around the world.

답변 (1개)

Chuguang Pan
Chuguang Pan 2020년 1월 22일
The p1 matrix is 1x100.
nerst(:) will turn a matrix nerst which is 1x100 to 100x1.
A matrix with size of 1x100 can't | with a matrix with size of 100x1.

Community Treasure Hunt

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

Start Hunting!

Translated by