From: Atahan Tolunay on
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
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
Try this:
filename = sprintf('%s.mat', cell2mat(selected_name));
delete(filename);
From: TideMan on
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'])