Deleting Rows in a Table as Determined by a Variable Value

1 次查看(过去 30 天)
I have a 189x317 table and a variable with a value (lets says 119).
I want to delete all rows from 199 onwards.
Please could someone advise.
Best wishes,

采纳的回答

madhan ravi
madhan ravi 2020-7-15
TabLE(119:end, :) = []
  3 个评论
Jake Bowd
Jake Bowd 2020-7-16
Madhan ravi,
Thank you so much! I think I was getting my brackets confused!!!
That worked perfectly!!! Thanks :).
I have now put the above into a for loop ;).
for i=1:size(TabLE,2)
From(i) = [Variable(1,i)];
TabLE{1, i}(From(1,i):end, :) = [];
end

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by