Bugger!
My aim in using cell arrays is to minimize number of calculations done. Here are simplified versions of what I have and what I want:
% Code I have (computationally intensive)
divs_x = 10;
D_x = linspace(1, divs_x, divs_x);
divs_y = 5*max(D_x);
D_y = linspace(0, pi, divs_y);
z = zeros(divs_x, divs_y);
for k = 1 : divs_x,
z(k, :) = cos(D_y);
end;
surf(D_y, D_x, z);
colormap(hot(128));
colorbar;
% Code I want but cannot plot
divs_x = 10;
D_x = linspace(1, divs_x, divs_x);
z = cell(1, divs_x);
D_y = cell(1, divs_x);
for k = 1 : divs_x,
divs_y = 5*D_x(k);
D_y{k} = linspace(0, pi, divs_y);
z{k} = cos(D_y{k});
end;
I could use plot3 to plot individual cells but it won't produce the color mapping that I want. I am not terribly concerned with filled surfaces (but would be nice).
