From: isabelle robitaille on
hallo,please i need your help,
I want to modify a content of a cell .
x='11011011' ( class(x) is cell )
how can I put in every 1 the number 0 and in every 0 the number 1,so at the end i have
x='00100100'

thanx
From: kinor on
"isabelle robitaille" <isabelle.robitaille(a)yahoo.fr> wrote in message <hnli7p$dv6$1(a)fred.mathworks.com>...
> hallo,please i need your help,
> I want to modify a content of a cell .
> x='11011011' ( class(x) is cell )
> how can I put in every 1 the number 0 and in every 0 the number 1,so at the end i have
> x='00100100'
>
> thanx

not elegant but working..

%find '1' and '0'
idx1 = strfind(x,'1');
idx2 = strfind(x,'0')

%replace
x{1}(idx1{:}) = '0'
x{1}(idx2{:}) = '1'
From: Walter Roberson on
isabelle robitaille wrote:
> hallo,please i need your help,
> I want to modify a content of a cell .
> x='11011011' ( class(x) is cell )
> how can I put in every 1 the number 0 and in every 0 the number 1,so at
> the end i have
> x='00100100'

cellfun(@(v) char('0' + v == '0'), x, 'Uniform, 0);