peak a part from a cell array
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ioannis Vourvachakis
il 4 Nov 2021
Commentato: Ioannis Vourvachakis
il 4 Nov 2021
From the cell array A, i create a new cell array B that contains a specific part of B.
B = A(wP,:);
How can I create a new cell array C that contains the rest content of A?
Thank you.
0 Commenti
Risposta accettata
Image Analyst
il 4 Nov 2021
Untested code:
% Get size of cell array:
[rows, columns] = size(A)
% Get some of the rows -- those specified by wP.
% Extract those rows into a new cell array called B.
B = A(wp, :);
% Find out what the other indexes (rows) are that are not in B:
indexes = setdiff(1 : rows, wP)
% Copy those particular rows to a new cell array called C:
C = A(indexes, :)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Cell Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!