Example of functions which complete a task, MATLAB in Statistics

Example of Functions which complete a task:

For illustration, the function below just prints the number arguments passed to it in a sentence format:

1481_Example of Functions which complete a task.png

As this function isn't computing anything, there are not any output arguments in the function header, and no =. An illustration of a call to the function is as shown below:

>> printem(3.3, 2)

The first number is 3.3 and the second is 2.0

Note that as the function is not returning any of the value, it cannot be called from an assignment statement. Any try to do this would answer in an error, for illustration,

>> x = printem(3, 5) % Error!!

??? Error using ==> printem

Too many output arguments.

We can hence, think of the call to the function which does not return values as a statement by itself, in which the function call cannot be imbedded in the other statement like an assignment statement or an output statement.

Posted Date: 10/19/2012 8:03:11 AM | Location : United States







Related Discussions:- Example of functions which complete a task, Assignment Help, Ask Question on Example of functions which complete a task, Get Answer, Expert's Help, Example of functions which complete a task Discussions

Write discussion on Example of functions which complete a task
Your posts are moderated
Related Questions
Location of a rectangle - graphics objects: The location of a rectangle is [x y w h], where x and y are the coordinates of the lower left point, here w is the width, and h is

Example of Function stubs: The three functions have not so far been written, though, therefore the function stubs are put in place so that the script can be executed and teste

Illustration of Indexing: Though, rather than of creating the index vector manually as shown here, the process to initialize the index vector is use to a sort function. The al

Example of customizing plots: As the other illustration of customizing plots, the pieces of a pie chart can be "exploded" from the rest. In this situation, the two vectors are

Nested for Loops: The action of a loop can be any of the valid statement(s). Whenever the action of a loop is the other loop, this is known as nested loop. As an illustrati

Indexing: The Indexing is an alternate to sort a vector. With indexing, the vector is left in its original order. An index vector is used to point values in the original vecto

Graphics objects: The objects involve graphics primitives like lines and text, and also the axes used to orient the objects. These objects are organized hierarchically, and the

Illustration of Indexing into vectors of structures: For illustration, the function to print the information from packages has been modified therefore in addition to the vecto

#qYou will need to examine two of the nine sections of data: one section of qualitative data (choose either Gender or Position) one section of quantitative data (choose either Intr

Variable packages: Variable packages are now the vector of structures, hence each and every element in the vector is a structure. To show one element in the vector, an index i