Programming Fundamentals - The MathWorks - #351

/ 840


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
Symbol Reference
Array Row Separator
When used within square brackets to create a new array or concatenate existing arrays, the semicolon creates a new row in the array:
A= [5, 8;3,4]
A=
58 34
Output Suppression
When placed at the end of a command, the semicolon tells MATLAB not to display any output from that command. In this example, MATLAB does not display the resulting 100-by-100 matrix:
A = ones(100, 100);
Command or Statement Separator
Like the comma operator, you can enter more than one MATLAB command on a line by separating each command with a semicolon. MATLAB suppresses output for those commands terminated with a semicolon, and displays the output for commands terminated with a comma.
In this example, assignments to variables A and C are terminated with a semicolon, and thus do not display. Because the assignment to B is comma-terminated, the output of this one command is displayed:
A=12.5; B=42.7, C=1.25;
B=
42.7000
Single Quotes — ' '
Single quotes are the constructor symbol for MATLAB character arrays.
3-109

pageCatalog pdf di En 2012-06-22-01