Re: using "eval" with strings from a cell array
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Fri, 1 Feb 2008 01:49:48 +0000 (UTC)
In article <fntspc$v38$1@xxxxxxxxxxxxxxxxx>,
=?UTF-8?B?TWljaGFlbCBSwppvZXNjaA==?= <mr_78-25@xxxxxx> wrote:
eval('string' cell_array(1))
returns these error:
Undefined function or method 'eval' for input arguments of type 'cell'
Any ideas how to change a single cell to a ordinary string?
cell_array{1} instead of cell_array(1)
But I'm not able to access these filenames with the eval function to
alter them before saving again.
It seems unlikely to me that you need to use eval to do what
you want to do. For example, if you wanted to change the extension
on each filename to 'xls', you could use
for K=1:length(cell_array)
cell_array{K} = [cell_array{K}(1:end-3) 'xls'];
end
--
This is a Usenet signature block. Please do not quote it when replying
to one of my postings.
http://en.wikipedia.org/wiki/Signature_block
.
- Follow-Ups:
- Re: using "eval" with strings from a cell array
- From: Michael Roesch
- Re: using "eval" with strings from a cell array
- References:
- using "eval" with strings from a cell array
- From: Michael Roesch
- using "eval" with strings from a cell array
- Prev by Date: Adding zero
- Next by Date: Re: Correction of Perspective Distortion
- Previous by thread: using "eval" with strings from a cell array
- Next by thread: Re: using "eval" with strings from a cell array
- Index(es):
Relevant Pages
|
Loading