"Unable to perform assignment..." Indices size error

조회 수: 1 (최근 30일)
Connor McGrath
Connor McGrath 2020년 8월 4일
댓글: Connor McGrath 2020년 8월 4일
Hi everyone. I'm writing a code for the Google PageRank algortihm and am getting an indices size error. I understand that this means that the code is trying to replace a row/colum with too many variables however the code that is giving me the error was given by my instructor and I dont entirely understand what is going on. I've attached the code below, any insight on how to solve the issue would be appreciated. Thanks!

채택된 답변

Rik
Rik 2020년 8월 4일
The source of the issue is a bit earlier in the code: the code that is supposed to find the dominant eigenvalue doesn't work as it should. The code below simply finds the value that is closest to 1, instead of assuming it will be almost 1.
[~,ind]=min(abs(sum(real(D))-1));
With this modification, the final output exists and makes sense to me.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by