Katie Brenner, MathWorks
Learn how to insert additional values into a vector in MATLAB. When working with an existing data set of any size, you may encounter a scenario that requires you to insert values into an existing vector. With the use of logical indexing, also known as conditional data indexing, you can easily insert values into an existing vector.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .Select web site
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.