deleting a full colum using
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(1 个)
Locks
2013-3-17
2 个评论
Azzi Abdelmalek
2013-3-17
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!