Illustration of empty vectors , MATLAB in Mathematics

Illustration of Empty vectors:

The Empty vectors can also be used to delete elements from the arrays. For illustration, to remove the third element from array, an empty vector is assigned to it:

>> vec = 1:5

vec =

          1  2  3  4  5

>> vec(3) = []

vec =

         1  2  4  5

The elements in vector are now numbered 1 through 4.

The Subsets of a vector could also be eliminated; for illustration:

>> vec = 1:8

vec =

1  2  3  4  5  6  7  8

>> vec(2:4) = []

vec =

1  5  6  7  8

 

Posted Date: 10/18/2012 5:35:33 AM | Location : United States







Related Discussions:- Illustration of empty vectors , Assignment Help, Ask Question on Illustration of empty vectors , Get Answer, Expert's Help, Illustration of empty vectors Discussions

Write discussion on Illustration of empty vectors
Your posts are moderated
Related Questions
strvcat function - concatenation: The function strvcat will concatenate it vertically, that means that it will generate a column vector of the strings.   >> strvcat(fir

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

Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer

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

Refer the subset of a matrix: It is also possible to refer to the subset of a matrix. For illustration, this refers to the first & second rows, second & third columns: >> m

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

how can reconstruct just part of an image using imreconstruct?

Illustration of Minimum and Maximum Value Both of these functions also return the index of the minimum or maximum value; when there is more than one occurrence, it returns the

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which

Fliplr function: The fliplr function "flips" the matrix from left to right (in another words the left-most column, the first column, become the last column and so on), and the