From: Judas Magnus on
i have a string

string= cellstr(char('Apple','Pie','Lemon'))
cf= cell(5,5);
r = randperm(numel(cf));
r = r(1:numel(string));
cf(r) = string(randperm(numel(string)))


I want to replace anything that is from the "string" to "monday" in the cf cell array.
From: Wayne King on
"Judas Magnus" <ragnaork5435(a)yahoo.com> wrote in message <hpbl4i$4bf$1(a)fred.mathworks.com>...
> i have a string
>
> string= cellstr(char('Apple','Pie','Lemon'))
> cf= cell(5,5);
> r = randperm(numel(cf));
> r = r(1:numel(string));
> cf(r) = string(randperm(numel(string)))
>
>
> I want to replace anything that is from the "string" to "monday" in the cf cell array.

Hi Judas, I'm not sure what you mean by your last statement. Are you saying something as simple as:

cf(r)={'monday'};

Wayne
From: Judas Magnus on
wow thanks.!! That was too simple *sweats*



"Wayne King" <wmkingty(a)gmail.com> wrote in message <hpc09r$4lc$1(a)fred.mathworks.com>...
> "Judas Magnus" <ragnaork5435(a)yahoo.com> wrote in message <hpbl4i$4bf$1(a)fred.mathworks.com>...
> > i have a string
> >
> > string= cellstr(char('Apple','Pie','Lemon'))
> > cf= cell(5,5);
> > r = randperm(numel(cf));
> > r = r(1:numel(string));
> > cf(r) = string(randperm(numel(string)))
> >
> >
> > I want to replace anything that is from the "string" to "monday" in the cf cell array.
>
> Hi Judas, I'm not sure what you mean by your last statement. Are you saying something as simple as:
>
> cf(r)={'monday'};
>
> Wayne
From: us on
"Judas Magnus" <ragnaork5435(a)yahoo.com> wrote in message <hpbl4i$4bf$1(a)fred.mathworks.com>...
> i have a string
>
> string= cellstr(char('Apple','Pie','Lemon'))
> cf= cell(5,5);
> r = randperm(numel(cf));
> r = r(1:numel(string));
> cf(r) = string(randperm(numel(string)))
>
>
> I want to replace anything that is from the "string" to "monday" in the cf cell array.

well... ???
since you know the STRING positions R, already...

cf(r)={'moday'};

but most likely, i am missing something...
us