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
design a rc phase shift oscillator for a particular frequency of oscillation and generate a sinusoidal signal


Type logical: The type logical is used to store the true/false values. If any variables have been formed in the Command Window, they can be seen at the Workspace Window. In

Example of Printing vectors: For vectors & matrices, even though formatting cannot be specified, the disp function may be simpler to use in common than fprintf as it displays

I want to write a function in matlab which gives me a population pyramid bar chart. could you please help me do this.

write a function program to compute a standard deviation of a number

Compute the result: To compute the area, the formula is required. In this situation, the area of the circle is π multiplied by the radius squared. Therefore, that means the va

Write a Matlab function that computes y1= tan(x) and y2= sin(x)/cos(x), returns the difference |y1-y2| and prints a message whether the two are equal or not. Test your function for


Illustrations of if statement: illustrations of running this script: >> sqrtifexamp Please enter a number: -4.2 The sqrt of 4.2 is 2.0 >> sqrtifexamp Please ent