Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: cells and string allocation

Subject: cells and string allocation

From: Corinna Schmitt

Date: 01 Aug, 2007 08:02:14

Message: 1 of 3

Hallo,

I work with cells in my program. I constrcuted the following:

finalTableAndHeader =

     [] [] [] [] 'prim_sec' 'Name' 'Integral [QL]' 'Bkg [QL]' 'MchipsID'
     [] [] [] [] '1' 'L14_250ng/ul' '89124.0' '67080.0' '02_02_16_19'
     [] [] [] [] '0' 'L14_250ng/ul' '101659.0' '61152.0' '02_02_16_19'
     [] [] [] [] '1' 'L14_650ng/ul' '114324.0' '62400.0' '02_02_16_17'
     [] [] [] [] '0' 'L14_650ng/ul' '142161.0' '67392.0' '02_02_16_17'

Now I want to fill the following cells with:

finalTableAndHeader(1,1)='Field'
finalTableAndHeader(1,1)='Plate'
finalTableAndHeader(1,1)='Letter'
finalTableAndHeader(1,1)='Number'

It does not work, always I get the error message:
??? Conversion to cell from char is not possible.

Error in ==> aidaimportV4 at 105
finalTableAndHeader(1,1)='Field'

The rest of this four columns should be filled with numbers which will be extracted from the column MchipsID. Example: '02_02_16_19' --> Field=2, Plate=2, Letter=16, Number=19

Finaly the finalTableAndHeader should be stored in an ASCII file.

Can anyone help me?

Thanks, Corinna

Subject: Re: cells and string allocation

From: us

Date: 01 Aug, 2007 08:24:39

Message: 2 of 3

Corinna Schmitt:
<SNIP syntax...

> finalTableAndHeader = [] [] [] [] ...
> finalTableAndHeader(1,1)='Field'

should read

     ftah=cell(4,4);
     ftah{1,1}='field';
% -or-
     ftah(1,2)={'pos'};
     ftah

us

Subject: Re: cells and string allocation

From: Titus

Date: 01 Aug, 2007 10:26:49

Message: 3 of 3


"Corinna Schmitt" <csc@mathworks.com> schrieb im Newsbeitrag
news:f8pem6$lij$1@fred.mathworks.com...
> Hallo,
>
> I work with cells in my program. I constrcuted the following:
>
> finalTableAndHeader =
>
> [] [] [] [] 'prim_sec' 'Name'
> 'Integral [QL]' 'Bkg [QL]' 'MchipsID'
> [] [] [] [] '1' 'L14_250ng/ul'
> '89124.0' '67080.0' '02_02_16_19'
> [] [] [] [] '0' 'L14_250ng/ul'
> '101659.0' '61152.0' '02_02_16_19'
> [] [] [] [] '1' 'L14_650ng/ul'
> '114324.0' '62400.0' '02_02_16_17'
> [] [] [] [] '0' 'L14_650ng/ul'
> '142161.0' '67392.0' '02_02_16_17'
>
> Now I want to fill the following cells with:
>
> finalTableAndHeader(1,1)='Field'
> finalTableAndHeader(1,1)='Plate'
> finalTableAndHeader(1,1)='Letter'
> finalTableAndHeader(1,1)='Number'
>
> It does not work, always I get the error message:
> ??? Conversion to cell from char is not possible.
>
> Error in ==> aidaimportV4 at 105
> finalTableAndHeader(1,1)='Field'
>
> The rest of this four columns should be filled with numbers which will be
> extracted from the column MchipsID. Example: '02_02_16_19' --> Field=2,
> Plate=2, Letter=16, Number=19
>
> Finaly the finalTableAndHeader should be stored in an ASCII file.
>
> Can anyone help me?
>
> Thanks, Corinna

Hi Corinna,

use curly braces to assign values/strings to individual cells:
finalTableAndHeader{1,1}='Field'

Titus


Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
syntax us 01 Aug, 2007 04:25:07
cell us 01 Aug, 2007 04:25:07
code us 01 Aug, 2007 04:25:06
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics