# reading the numbers resulting from the loop

2 visualizzazioni (ultimi 30 giorni)
Berfin Çetinkaya il 29 Mag 2022
Commentato: Walter Roberson il 29 Mag 2022
Hello friends
I got some numbers at the end of the loop. But I couldn't understand what exactly these numbers mean
For example, does the number 10^4* 2.2567 mean twenty-two thousand five hundred and sixty-seven?
.
Thank you!
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (2)

John D'Errico il 29 Mag 2022
Why would it mean anything else? That is, what is the product of the numbers 10^4*2.2567?
10^4* 2.2567
ans = 22567
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

Edward Tomanek il 29 Mag 2022
Hi Berfin,
The short answer is yes, you understood it right. You just multiply each number in that vector by 10^4.
When MATLAB thinks a number is too big or too small to be displayed properly without overrunning the line, especially in the case of arrays, it scales them all this way. It's designed to make the output look better, but it does mean sometimes you have to scroll all the way up to the top of an outputted array to see if there's e.g. a 10^4 in front. It's easy to miss.
Regards,
Edward
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Walter Roberson il 29 Mag 2022
You can change this behaviour by using the command
format long g

Accedi per commentare.

### Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by