Error "not enough input arguments"
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
vignesh raju
le 4 Fév 2016
Commenté : Star Strider
le 4 Fév 2016
Hi all, I'm new to MatLab and I'm trying to run this code below with the file saved as eigencentrality.m and when I run in Command it gives the above error.
Have searched the forum but unable to figure out the solution for this. Please help.
%eigen centrality
function x=eigencentrality(A)
[V,D]=eig(A); [max_eig,ind]=max(diag(D)); x=V(:,ind);
0 commentaires
Réponse acceptée
Star Strider
le 4 Fév 2016
You have to call your function as:
A = [1 2; 3 4];
x=eigencentrality(A)
You cannot run it as you would a script.
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Environment and Settings dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!