Controlling Command Window Input and Output

March 19th, 2010 No Comments   Posted in Documents

The format Function

The format function controls the numeric format of the values displayed. The function affects only how numbers are displayed, not how MATLAB software computes or saves them. Here are the different formats, together with the resulting output produced from a vector x with components of different magnitudes. Read More

while

March 6th, 2008 No Comments   Posted in Controls

while Repeat statements an indefinite number of times.
The general form of a while statement is: Read More

return

March 6th, 2008 No Comments   Posted in Controls

return Return to invoking function.
return causes a return to the invoking function or to the keyboard.
It also terminates the KEYBOARD mode. Read More

elseif

March 6th, 2008 No Comments   Posted in Controls

elseif IF statement condition.
elseif is used with IF. The statements after the elseif are
executed if the expression is true and all the preceding IF and
elseif expressions are false. An expression is considered true if
the real part has all non-zero elements. Read More

if

March 6th, 2008 No Comments   Posted in Controls

if if statement condition.
The general form of the if statement is Read More

for

March 6th, 2008 No Comments   Posted in Controls

for Repeat statements a specific number of times.
The general form of a for statement is: Read More

end

March 6th, 2008 No Comments   Posted in Controls

end Terminate scope of FOR, WHILE, SWITCH, TRY, and IF statements. Without END’s, FOR, WHILE, SWITCH, TRY, and IF wait for further input. Each end is paired with the closest previous unpaired FOR, WHILE, SWITCH, TRY or IF and serves to terminate its scope. Read More