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 =


>> format compact

>> 2^7

ans =


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 =


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
Linear indexing: This is termed as linear indexing. It is generally much better style when working with the matrices to refer to the row and column indices, although. An in

Explain how the wavelet transform based on the real biorthogonal "decomposition" wavelet bior 1.5 (the wavelet shape by typing waveinfo ('bior') at the MATLAB command prompt) can

Built-In Functions and help: There are lots of built-in functions in a MATLAB. The help command is used to find out what functions MATLAB has, and how to use them. For illustr

1.      Write a MATLAB program to generate and plot the signal                                     x1(n) = [3 2 -2 0 7],  n = 0,1,2,3,4. 2.      Write a MATLAB program to gen

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

Random numbers: Whenever a program is being written to work with a data, and the data is not yet available, it is frequently useful to test the program first by initializing t

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

Calling an User-Defined Function from Script: Now, we will change our script which prompts the user for the radius and computes the area of a circle, to call our function cal

Problem 1:   What are the different methods that can be used to solve a differential equation? Please provide a numbered list. Problem 2:   For a first order linear d

Simple Related Plot Functions: The other functions which are useful in customizing plots are the figure, clf, hold, leg-end, and grid. The short description of such functions