the format function and ellipsisthe default in


The Format Function and ellipsis:

The default in MATLAB is to show numbers which have decimal places with four decimal places. The format command can be used to identify the output format of expressions. There are many options, involving making the format short (by default) or long. For illustration, changing the format to long will results in 15 decimal places. This will remain unaffected until the format is changed back to short, as elaborated with an expression and with the built-in value for pi.

>> format long

>> 2 * sin(1.4)

ans =

1.970899459976920

>> pi

ans =

3.141592653589793

>> format short

>> 2 * sin(1.4)

ans =

1.9709

>> pi

ans =

3.1416

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: the format function and ellipsisthe default in
Reference No:- TGS0174699

Expected delivery within 24 Hours