Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: character array from cell
Date: Fri, 3 Jul 2009 20:55:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <h2lr76$jch$1@fred.mathworks.com>
References: <h2lqkf$cqp$1@fred.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
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 1246654502 19857 172.30.248.37 (3 Jul 2009 20:55:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 3 Jul 2009 20:55:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:552727

Hello Mohammad,

If you pad the shorter character array with a sufficient number of blanks, you should be able to have that char array:

G(1,:) = 'x+y+1   ';  % I put three blanks at the end.
G(2,:) = '3x-5y+10';

Best.

"mohammad movassat" <movassat@gmail.com> wrote in message <h2lqkf$cqp$1@fred.mathworks.com>...
> Is there any way I can make a 2*1 character array from a 2*1 cell? I have a 2*1 cell:
> f{1}=x+y+1 and f{2}=3x-5y+10, (x and y are syms) I want to have a char G<2*1> with exactly the same elements. 
> 
> ps. the Matlab version I'm using is not very updated, so I'm looking for a way using basic commands in matlab not by specific toolboxes.  any suggestions?
> 
> Thank you