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

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

Accepted Answer

Rik
Rik on 4 Aug 2020
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!