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
Pie chart - plot functions: The MATLAB also has a function pie which will generate a pie chart. Calling the function with the form pie (vec) draws a pie chart, by using the pe

Illustration of logical built-in functions: The function find returns the indices of a vector which meet certain criteria. For illustration, to find all the elements in a vect

User-defined functions: Therefore, although many functions compute and return values, some do not. A few functions rather merely accomplish a task. Regardless of what type of

Illustration of Writing variables to a file: For illustration, in the below session in the Command Window, 3 variables are generated; these are then exhibited using who. Then,

Example of Minimum and Maximum Value For matrices, the functions min and max operate column wise by the default: >> mat = randint(2,4,[1 20]) mat =    9   10   1

Strcat function - Concatenation : The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trail

Built-in function for Differentiation: The MATLAB has a built-in function, diff that returns the differences between consecutive elements in a vector. For illustration, >>

Illustrations of Variable number of output arguments: In the illustrations shown here, the user should actually know the type of the argument in order to establish how many va

Differentiation: The derivative of a function y = f(x) can be written as follows or f  '(x) and is defined as the rate of change of the dependent variable y with respe

Plot types: Besides plot and bar, there are another plot types like stem plots, histograms, stem plots, area plots and pie charts, and also other functions which customize the