Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to convert nonuniform cell to uniform matrix?
Date: Mon, 1 Apr 2013 05:28:18 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 13
Message-ID: <kjb5ti$bvn$1@newscl01ah.mathworks.com>
References: <kjajrm$okp$1@newscl01ah.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1364794098 12279 172.30.248.47 (1 Apr 2013 05:28:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Apr 2013 05:28:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:792382

% Mapping
longstr={'Validation stop.' 'Minimum gradient reached.' 'Performance goal met.'};
shortstr={'valstop' 'mingrad' 'perfmet'};

% Random data
stopcrit0 = longstr(ceil(3*rand(10,15)));

% Simple indexing:
[~, loc] = ismember(stopcrit0, longstr);
stopcrit = shortstr(loc)
% Let you rearrange stopcrit as "char matrix" (I'm not sure what is it).

% Bruno