deleting a full colum using
Mostrar comentarios más antiguos
I have a matrix with several optionprice data. Now I am trying to delete rows based on a for loop and if criteria. if the value of column 8 is >1.1 or <0.9, the whole row should be deletet. I have used the following code, but I always get an error message:
for i=1:numel(matrix)
if(matrix(i,8)>1.1)
matrix(i,:) = [];
end
end
1 comentario
Jan
el 17 de Mzo. de 2013
Please post the error message whenever you explain, that there is an error.
Respuesta aceptada
Más respuestas (1)
Locks
el 17 de Mzo. de 2013
0 votos
2 comentarios
Azzi Abdelmalek
el 17 de Mzo. de 2013
Sven, if the answer helped, click on accept this answer. Also, to add a comment, click on comment on this answer just under the answer.
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!