peak a part from a cell array

1 回表示 (過去 30 日間)
Ioannis Vourvachakis
Ioannis Vourvachakis 2021 年 11 月 4 日
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.

採用された回答

Image Analyst
Image Analyst 2021 年 11 月 4 日
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, :)
  1 件のコメント
Ioannis Vourvachakis
Ioannis Vourvachakis 2021 年 11 月 4 日
thank you very much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by