The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: using "eval" with strings from a cell array
Replies: 6   Last Post: Nov 29, 2016 11:43 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Michael Ršoesch

Posts: 9
Registered: 1/31/08
Re: using "eval" with strings from a cell array
Posted: Jan 31, 2008 10:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Walter Roberson schrieb:

> cell_array{1} instead of cell_array(1)

I thought, I had first tried this unsuccessfully, but (now) it works.

And you are right, for the example provided, I should not need eval.

But actually I intended to write a new file based on the name of the
original file with dlmwrite and therefor I needed this cell array
content as ordinary string.

Now I solved this with simple concatenating (and with {} instead of () ):

output_file_name=['output_' file_name{1}];

dlmwrite([output_path_name output_file_name], data, '\t');

Thanks for your help,

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.