Docs @ Psychtoolbox Wiki : MergeCell

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

MergeCell

PsychtoolboxPsychOneliners

Merges contents of multiple cell arrays into one big cell array

c = MergeCell(varargin)

MergeCell takes any number of cell vectors (contain the same datatype)
and concatenates their contents into one big cellvector
Any signleton inputs are expanded as needed, these inputs can be 1x1
cells or the contained datatype itself

Example: To add some information about fit to plot legend, we'd wan't to
append information about the fit to the line labels:

linelbls = {'line a','line b','line c'};
chi2_r = [.9 1 4.2];
chi2_rtxt= arrayfun(@(x) sprintf('slope: %.3f',x),chi2_r,'UniformOutput',false);

leglbls = MergeCell(linelbls,', chi^2_r: ',chi2_rtxt);
% leglbls = MergeCell(linelbls,{', chi^2_r: '},chi2_rtxt); would be equivalent





Path   Retrieve current version of MergeCell.m from berliOS: beta | view WebSVN changelog of trunk branch
Psychtoolbox/PsychOneliners/MergeCell.m


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0220 seconds