Pass Contents of Multiple Cells as Comma Separated List To Function
This example plots X against Y , and applies line styles from a 2-by-3 cell array C.
X = -pi:pi/10:pi;
Y = tan(sin(X)) - sin(tan(X));
C(:,1) = {'LineWidth'; 2};
C(:,2) = {'MarkerEdgeColor'; 'k'};
C(:,3) = {'MarkerFaceColor'; 'g'};
plot(X, Y, '--rs', C{:})
Pass Contents of Cell Arrays to Functions
12-13
Précédent

- 549/1450

Suivant