"Unable to perform assignment..." Indices size error
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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!
0 commentaires
Réponse acceptée
Rik
le 4 Août 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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Web Services dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!