Format command, MATLAB Programming

Format command:

The format command can be used to control the spacing between the MATLAB command or expression and the outcome; it can be either compact or loose.

>> format loose

>> 2^7

ans =

128

>> format compact

>> 2^7

ans =

128

Particularly long expressions can be continued on the next line by typing three (or more) periods that is the continuation operator, or the ellipsis. For illustration,

>> 3 + 55 - 62 + 4 - 5 .   .   .

+ 22 - 1

ans =

16

Posted Date: 10/18/2012 3:31:29 AM | Location : United States







Related Discussions:- Format command, Assignment Help, Ask Question on Format command, Get Answer, Expert's Help, Format command Discussions

Write discussion on Format command
Your posts are moderated
Related Questions

Functions with Local Variables: The functions we have seen faraway have been very easy. Though, in many situations the computations in a function are more complex, and may nee

The Plot Function: We will begin with a very simple graph of one point using the plot function. The script, plotonepoint, below plots only one point. To do this, at first the

Illustration of a built-in function: The length function is an illustration of a built-in function which computes a single value; it returns the length of a vector. As an illu

How do you write a programme that asks the user for a number between 1 and 1000 and calculates the sum of its digits?

Barrier Option pricing in Matlab using MC simulation or finite difference methods


Illustration  of assignment statements: At that point, if the expression mynum 3 is entered, the default variable ans is used as the result of this expression is not assigned

Illustration of switch statement: Here are the two illustrations of calling this function: >> quiz = 22; >> lg = switchletgrade(quiz) lg = X >> quiz = 9; >>