Path: news.mathworks.com!not-for-mail
From: "Barry Williams" <barry.r.williamsnospam@saic.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Adding Text columns to a Matrix
Date: Wed, 17 Sep 2008 18:55:04 +0000 (UTC)
Organization: SAIC
Lines: 13
Message-ID: <garjq8$ael$1@fred.mathworks.com>
References: <garivv$sni$1@fred.mathworks.com>
Reply-To: "Barry Williams" <barry.r.williamsnospam@saic.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1221677704 10709 172.30.248.35 (17 Sep 2008 18:55:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 17 Sep 2008 18:55:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 804417
Xref: news.mathworks.com comp.soft-sys.matlab:490658


"Raju Gain" <supernova5271@yahoo.com> wrote in message <garivv$sni$1@fred.mathworks.com>...
> Hello,
> 
> 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) (to make it as the fourth column) but I keep getting an error which says " The following error occurred converting from cell to double:
> Error using ==> double
> Conversion to double from cell is not possible."
> 
> I am not sure what I am doing wrong. It should be quite straight forward. Can someone help?
> 
> Thanks

Search the documentation for information on creating a cell array.  This will hold both numerical and text data.
Barry