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

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일

1 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2020년 8월 4일

댓글:

2020년 8월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by