how to replace missing values from a double inside a cell array?

1 次查看(过去 30 天)
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
newA=cellfun(@(x) x.*(x~=100000)./(x~=100000),A,'Uni',false)

更多回答(1 个)

BN
BN 2020-2-5
编辑:BN 2020-2-5
index=find(A==100000); %found 100000 in the A
A(index)=NaN; % Replace them by NaN

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by