I really thanks in advance anybody can tell me how can I replace THE missing values (100000) in the below cell array with NaN.
A = {[1,2,3,100000,4,5,100000],[6,100000,7,100000]};

 採用された回答

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2020 年 2 月 5 日

0 投票

newA=cellfun(@(x) x.*(x~=100000)./(x~=100000),A,'Uni',false)

その他の回答 (1 件)

BN
BN 2020 年 2 月 5 日
編集済み: BN 2020 年 2 月 5 日

0 投票

index=find(A==100000); %found 100000 in the A
A(index)=NaN; % Replace them by NaN

2 件のコメント

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2020 年 2 月 5 日
'==' does not work with argument of type cell
BN
BN 2020 年 2 月 5 日
Dear JESUS,
You are right, It's my bad. Thank you for letting me know

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

カテゴリ

ヘルプ センター および File Exchange で Structures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by