Are you still getting an error? Have you tried dbstop on error and looking at the variables?

]]>function skip_surf(z,numLines)

h = surf(z,’EdgeColor’,’none’);

[n,m] = size(z);

x1 = 1:m;

y1 = 1:n;

x2 = round(linspace(x1(1),x1(end),numLines));

y2 = round(linspace(y1(1),y1(end),numLines));

surface(h.XData(x1),h.YData(y2),h.ZData(y2,x1),’FaceColor’,’none’,’MeshStyle’,’row’)

surface(h.XData(x2),h.YData(y1),h.ZData(y1,x2),’FaceColor’,’none’,’MeshStyle’,’column’)

>>skip_surf(peaks(1000),15)

]]>Try re-arranging deep_mean and shallow_mean into matrices:

dm = reshape(deep_mean,12,[]); % Tells reshape to have each row as a month and determine the number of columns automatically.

dm_summer would then be nanmean(dm(6:8,:)); %This tells matlab to pull out rows 6, 7, and 8 (all columns) and compute the mean from there.

]]>I believe it’s the curse of prosperity. Matlab built-in functions base grows and grows, and we forget about the functions we used yesterday. That’s the reason I appreciate the documentation so much. ]]>

Yes, strncmp would be better. I had forgotten about that function. I often use it in another utility function:

function result= startswith(x,y)

result = strncmp(x,y,length(y)); % true if x=[y, ‘***’],

end

One thing that came to my mind is to use “strncmp” instead of “strfind” and “cellfun” in this case, so it would look like:

%% Find Files Under MATLAB Root

found = strncmp(fileNames, matlabroot, length(matlabroot)); % Logical array for matlabroot files

Very useful and simple function. I must admit I would used it, but was too lazy to try to write something like this.

]]>I’m confused by the size of ‘valueStore.mat: Before changing the data it was about 1.7 MB, after 1.75 KB, but you only deleted two values.

What happend?

Jack

(There is no full-screen possibilty with html video (without flash) on your page :-( )

]]>