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
Creating Customized strings: There are many built-in functions which create customized strings, including blanks, char, and sprintf. We know that the char function can be u

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 fopen - file function: The permission string in the call to the fopen function identifies that the file is opened for writing to it. Just as when reading from a file,

Referring to and Modifying the Matrix Elements: To refer to matrix elements, the row and then the column indices are given in parentheses (always the row index initially and t

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

Script a MATLAB program which meets the following speci cations: The program expects an input of a two-variable real-valued continuous function f : R^2--> R The program is to cal

Creating string Variables: The string consists of a few numbers of characters (including, possibly, none). These are the illustrations of the strings: '' 'x' 'ca

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

This project requires you to use the ideas of Chapter 25 regarding maximization of a function. Here we assume that evolution has acted to generate highly efficient foragers. By hig

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