Function Reference: Volume 2 (F-O) - The MathWorks - #351

/ 1568


catalogue search
P. 351
P. 352
P. 353
P. 354
P. 355
P. 356
P. 357
P. 358
P. 359
P. 360
P. 361
P. 362
P. 363
P. 364
P. 365
P. 366
P. 367
P. 368
P. 369
P. 370
P. 371
P. 372
P. 373
P. 374
P. 375
P. 376
P. 377
P. 378
P. 379
P. 380
P. 381
P. 382
P. 383
P. 384
P. 385
P. 386
P. 387
P. 388
P. 389
P. 390
P. 391
P. 392
P. 393
P. 394
P. 395
P. 396
P. 397
P. 398
P. 399
P. 400


See other catalogues for The MathWorks

Text version of the page
format
The hexadecimal display corresponds to the internal representation of the value. It is not the same as the hexadecimal notation in the C programming language.
Example 4
This example illustrates the short eng and long eng formats. The value assigned to variable A increases by amultipleof10eachtime through the for loop.
A = 5.123456789;
for k=1:10 disp(A) A= A* 10;
end
The values displayed for A are shown here. The power of10 is always a multiple of 3. The value itself is expressed in 5 or more digits for the short eng format, and in exactly 15 digits for long eng:
format short eng format long eng
5.1235e+000 5.12345678900000e+000
51.2346e+000 51.2345678900000e+000
512.3457e+000 512.345678900000e+000 5.1235e+003 5.12345678900000e+003
51.2346e+003 51.2345678900000e+003
512.3457e+003 512.345678900000e+003 5.1235e+006 5.12345678900000e+006
51.2346e+006 51.2345678900000e+006
512.3457e+006 512.345678900000e+006 5.1235e+009 5.12345678900000e+009
Algorithms If the largest element of a matrix is larger than 103 or smaller than 10-3, MATLAB applies a common scale factor for the short and long formats. The function format + displays +, -, and blank characters for positive, negative, and zero elements. format hex displays the hexadecimal
2-1295

pageCatalog pdf di En 2012-06-22-01