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
Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =

Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).

Function xlsread - file function: The function xlsread will read from the spreadsheet file. For illustration, to read from file just generated: >> ssnums = xlsread('ranexc

Use of string variables: The Characters involve letters of the alphabet, punctuation marks, digits, white space, and control characters. The Control characters are characters

Changing Dimensions: In addition to transpose operator, the MATLAB has some built-in functions which change the dimensions or configuration of matrices, involving fliplr, resh

Matrix of Plots: The other function which is very useful with any type of plot is subplot that creates a matrix of plots in the present Figure Window. The three arguments are

Illustration of Writing to files: Here is the other illustration in which a matrix is written to a file. At First, an arbitrary 2 × 4 matrix is generated, and then it is writt

Polar Form: Any complex number z = a + bi can be thought of as a point (a,b) or vector in the complex plane in which the horizontal axis is the real part of z, and the vertica

Symbolic Expression The solve function solves an equation and returns the solution(s) as symbolic expressions. The answer can be converted to numbers by using any numeric funct

Example of Recursive functions: This definition is recursive as a factorial is defined in terms of the other factorial. There are two parts to any recursive definition: the co