To delete a specific row of a vector in MATLAB, you can use the delete
function. Here's an example:
main.m87 chars6 lines
In this example, we delete the third row of the vector
by overwriting it with an empty array. The resulting vector
will be:
main.m13 chars2 lines
Note that MATLAB vectors are 1-dimensional, so when we refer to deleting a "row", we're really referring to deleting an element in the vector.
gistlibby LogSnag