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
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

Writing to Files: There are many lower level functions which can write to files. We will focus on the fprintf function that can be used to write a file and also to append to a

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

Animation: In this part we will observe a couple of ways to animate a plot. These are visuals, therefore the outcomes can't really be shown here; it is essential to type these

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

Logical Vectors: The relational operators can also be used with the vectors and matrices. For illustration, let's say that there is a vector, and we want to compare each eleme

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

Nested IF-ELSE statements: The if-else statement is used to select between the two statements. In order to select from more than two statements, the if-else statements can als

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,