Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Adding Text columns to a Matrix
Date: Wed, 17 Sep 2008 23:34:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <gas45a$941$1@fred.mathworks.com>
References: <garivv$sni$1@fred.mathworks.com> <garkd2$ifv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1221694442 9345 172.30.248.37 (17 Sep 2008 23:34:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 17 Sep 2008 23:34:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1292953
Xref: news.mathworks.com comp.soft-sys.matlab:490689


Thanks everyone..
Got it working..


"Walter Roberson" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message <garkd2$ifv$1@fred.mathworks.com>...
> "Raju Gain" <supernova5271@yahoo.com> wrote in message <garivv$sni$1@fred.mathworks.com>...
> 
> > I have created a variable A = zeros(5,5). The first three 
> > columns contain double values. I have another variable 
> > which contains strings for example 'Yes' or 'No'. I am
> > trying to add this variable to A(:,4)
> 
> You cannot mix data classes in a single array. You cannot
> have text in a numeric array.
> 
> The closest you can get is the approach the other poster
> suggested, which is to use a cell array -- or you could
> use a structure which had a field for the numerics and
> another field for the text. But neither cell arrays
> nor structures will display "nicely" as columns of numbers
> intermixed with columns of text.