Delete the first element from each first row inside the cell array
11 次查看(过去 30 天)
显示 更早的评论
Hi!
How can I delete the very first element from the first row in every cell array? Number of rows inside each cell array is always 1, number of columns is different.
Example:
A = {[1 2 3 4 5]; [1 2 3 4 5 6]; [1 2 3 4]; [1 2 3 4 5 6 7]}; % in the beginning
A = {[2 3 4 5]; [2 3 4 5 6]; [2 3 4]; [2 3 4 5 6 7]}; % in the end
Thanks!
0 个评论
采纳的回答
Sriram Tadavarty
2020-11-5
Hi Daria,
You can try
A1 = cellfun(@(x) x(2:end), A, 'UniformOutput', false)
Hope this helps.
Regards,
Sriram
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!