Feeding cell from some matrix contents

Samuel Gougeon Samuel.Gougeon at univ-lemans.fr
Fri Dec 11 19:44:02 CET 2009


Hello,

I would like to set cell elements from some matrix contents:
Example:
m=rand(4,4);
c=cell(size(m));
i=find(m>0.5);

// Then every following syntax fails:
c.entries(i)=m(i);                // messerr = "not yet implemented"
setfield(i,m,c);                   // messerr = not yet implemented
// even when trying to straightforwardly (re)define:
--> c=makecell(size(m),m);     //
 !--error 10000
makecell: Wrong input arguments: Dimensions given as first argument do 
not match specified cell contents.
at line      12 of function makecell called by : 
makecell(size(t),t)
// Same error with makecell(size(t),t(:))

I would like to avoid building a string list with a for/end + "makecell(  )"
and then eval() it.

Any hint about that would be appreciated
Thanks
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20091211/8798cd07/attachment.htm>


More information about the users mailing list