Functions to create special matrices, MATLAB in Mathematics

Functions to create special matrices:

The MATLAB also has various functions which create special matrices. For illustration, the zeros function generates a matrix of all zeros. Similar to rand, either one argument can be passed (that will be both the number of rows and columns), or two arguments (at first the number of rows and then the number of columns).

 

>> zeros(3)

ans =

0 0 0

0 0 0

0 0 0

>> zeros(2,4)

ans =

0 0 0 0

0 0 0 0

 

 

Posted Date: 10/18/2012 4:21:03 AM | Location : United States







Related Discussions:- Functions to create special matrices, Assignment Help, Ask Question on Functions to create special matrices, Get Answer, Expert's Help, Functions to create special matrices Discussions

Write discussion on Functions to create special matrices
Your posts are moderated
Related Questions
Writing variables to a File: The save command is used to write variables to a file, or to append the variables to a MAT-file. By the default, save function writes to a MAT-fil

Minimum and Maximum Value The MATLAB has built-in functions for numerous statistics. For illustration, min and max to find the minimum or maximum value in a data set. >> x

Histogram: The histogram is a particular type of bar chart which shows the frequency of occurrence of the values within a vector. The Histograms use what are known as bins to

Recursive Functions: The Recursion occurs whenever something is defined in terms of itself. In the programming, a recursive function is a function which calls itself. The Recu


5 p2+8p+15, 3 p2-3p-18, 12 p2-p-30

Function isreal - complex numbers: The function isreal returns 1 for logical true when there is no imaginary part of the argument, or 0 for false when the argument does have a

Error-Checking for Integers: As MATLAB uses the type double by default for all the values, to check to make confirm that the user has entered an integer, the program have to c

Using Functions with the Vectors and Matrices: As MATLAB is written to work with the vectors and matrices, the whole vector or matrix can be passed as an argument to the funct

Illustration of Labels and prompts: The program below prompts the user for endpoints (x1, y1) and (x2, y2) of a line segment, and computes the midpoint of the line segment, th