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
Customizing Plots : There are numerous ways to customize figures in the Figure Window. On clicking the Plot Tools icon will bring up the Property Editor & Plot Browser, with ma

Applications of Customized Strings: Labels, Prompts, Arguments to Functions: The one of very useful application of this is to involve numbers in strings that are used to plot


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

Example of Symbolic Expression When there is more than one variable, the MATLAB selects which to solve for. In the illustration below, the equation ax 2 + bx = 0 is solved. Th

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

Structure Consisting of the Fields A MATLAB can also solve the sets of equations. In this illustration, the solutions for x, y, & z are returned as a structure consisting of th

Program of built-in factorial function: Calling this function yields similar result as the built-in factorial function: >> fact(5) ans =   120 >> factorial(

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

Illustration of Variance For illustration, for the vector [4, 6, 1, 5], there are n = 4 values therefore n - 1 is 3. The mean of this data set is also 4. The variance will be