Why does this showing inf?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Farshad Afzali
le 20 Sep 2017
Commenté : Christoph F.
le 20 Sep 2017
Hi guys,
I appreciate it if some one can tell me what's the problem with my code that shows inf?
n=linspace(1,10^9,10);
y=exp(1);
e=(1+(1\n)).^n;
error=abs(y)-abs(e)/abs(y)
0 commentaires
Réponse acceptée
Walter Roberson
le 20 Sep 2017
Look at the value of 1\n .
Are you certain that you intended to use Matrix Left Divide rather than ./ ?
3 commentaires
Walter Roberson
le 20 Sep 2017
/ is Matrix Right Divide. You want Right Divide which is ./
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!