MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

temperature(3,:) = {'20-Jun-2010', [72, 85, 53]};
temperature(4,:) = {'15-Sep-2010', [63, 81, 56]};
temperature(5,:) = {'31-Dec-2010', [38, 54, 18]};


allTemps = cell2mat(temperature(:,2));
dates = datenum(temperature(:,1), 'dd-mmm-yyyy');


plot(dates, allTemps)
datetick('x','mmm')


Pass the contents of multiple cells as a comma-separated list to functions that
accept multiple inputs.


This example plots X against Y , and applies line styles from a 2-by-3 cell array C.


Pass Contents of Cell Arrays to Functions
Free download pdf