From: Atahan Tolunay on 9 Jun 2010 19:10 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <38132a3a-fa0f-44ff-b564-c8873e836e19(a)19g2000vbi.googlegroups.com>... > Try this: > save(cell2mat(selected_name)); That worked! Thanks.
From: Atahan Tolunay on 9 Jun 2010 19:24 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <38132a3a-fa0f-44ff-b564-c8873e836e19(a)19g2000vbi.googlegroups.com>... > Try this: > save(cell2mat(selected_name)); One more thing. How do I go about solving the same problem for the delete function? It requires a ".mat" at the end to sucessfully delete Peter.mat. delete(cell2mat(selected_name) '.mat') doesn't work. (selected_name = 'Peter') Do you have another quick fix for this? Thanks.
From: ImageAnalyst on 9 Jun 2010 19:30 Try this: filename = sprintf('%s.mat', cell2mat(selected_name)); delete(filename);
From: TideMan on 9 Jun 2010 19:40 On Jun 10, 11:24 am, "Atahan Tolunay" <atato...(a)hotmail.com> wrote: > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <38132a3a-fa0f-44ff-b564-c8873e836...(a)19g2000vbi.googlegroups.com>... > > Try this: > > save(cell2mat(selected_name)); > > One more thing. How do I go about solving the same problem for the delete function? It requires a ".mat" at the end to sucessfully delete Peter.mat. > > delete(cell2mat(selected_name) '.mat') doesn't work. (selected_name = 'Peter') > > Do you have another quick fix for this? Thanks. Just put the string in square brackets: delete([cell2mat(selected_name) '.mat'])
|
Pages: 1 Prev: Reading variables from base workspace into a GUI? Next: How to Install a Toolbox |