Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Removing a location from a vector.
Posted:
Mar 24, 2013 8:25 PM


On 3/24/2013 2:50 PM, Skylar wrote:
> > As you see I have made the comparisons, but I am curious as to if >there is a function to delete certain locations from the vectors >without having to create another vector and store all data that is not equal into it. > > Thanks for the help. >
Are you saying, for example, given A a vector of 10 elements, and you want to "delete" the second element of this vector, but want keep the same vector as is, still with 10 elements (but now with the second element "deleted" from it) so to avoid making a new vector, say B, of 9 elements and copy those 9 elements from A to B and delete the memory occupied by A?
Is this what you are asking?
Just trying to understand the question first.
Nasser



