M = reshape(testim,[270*293,3]); imshow(reshape(M(:,1),[270,293])) intensity = reshape(M*[1/3;1/3;1/3],[270,293]); uiopen imshow(intensity) intensity = sum(testim,3)/3; imshow(intensity) cd('p:\matlab\photostereo'); normal2image normalscript normalgenerationscript normalize normalgenerationscript ans = 1.0000 -5.7505 ans = 1.0000 -5.7505 ans = 0 2.9767 normalgenerationscript ans = 1.0000 -5.7505 ans = 1.0000 -5.7505 ans = 0 2.9767 axis equal hold on hold off pause pause(2) pause more more on more off PlotStereoResults plotedit plotpts plot plotm plotyy plot3 plotmatrix plotcorresponding plotmeshnorms help plotmeshnorms % plotmeshnorms(meshnorms,scale,subsamp) plots mesh normals help sum SUM Sum of elements. For vectors, SUM(X) is the sum of the elements of X. For matrices, SUM(X) is a row vector with the sum over each column. For N-D arrays, SUM(X) operates along the first non-singleton dimension. SUM(X,DIM) sums along the dimension DIM. Example: If X = [0 1 2 3 4 5] then sum(X,1) is [3 5 7] and sum(X,2) is [ 3 12]; See also PROD, CUMSUM, DIFF. Overloaded methods help single/sum.m spherescript imshow(im) spherescript ??? Subscript indices must either be real positive integers or logicals. Error in ==> p:\matlab\photostereo\spherescript.m On line 14 ==> albedos(r/2,:) = 0; r r = 121 spherescript diary off