Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Moving characters from a string into a cell array
Date: Sat, 18 Feb 2012 23:52:11 +0000 (UTC)
Organization: University of North Carolina
Lines: 12
Message-ID: <jhpdjb$eud$1@newscl01ah.mathworks.com>
References: <jhp9rb$48a$1@newscl01ah.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1329609131 15309 172.30.248.45 (18 Feb 2012 23:52:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 18 Feb 2012 23:52:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:758142

Hi John,

One solution:

s = 'Hello how are you';
c = textscan(s,'%s');
c = c{1};
for k = 1:length(c)
    c{k} = cellstr(c{k}')';
end

Best.