determining machine epsilon through steps
Afficher commentaires plus anciens
I was doing my homework, and it asks me to write a code to determine epsilon. The question was to write code based on these steps
Step 1: Set ε = 1.
Step 2: If 1 + ε is less than or equal to 1, then go to Step 5. Otherwise go to Step 3.
Step 3: ε = ε/2
Step 4: Return to Step 2
Step 5: ε = 2 × ε
So I wrote,
e=1
while e+1>=1
e=e/2;
end
e=2*e;
however, not only looks like MATLAB doesn't want to process this, but also stopped working. I still can type codes but none of them actually getting registered. I just started to learn MATLAB, so I know almost nothing about it. Anyone can help me?
I'm using MATLAB through Citrix, by the way.
1 commentaire
Star Strider
le 17 Sep 2014
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!