function prob1b(t) global M n=10; t=6; x = linspace(-1, 1, n); y = linspace(-1, 1, n); M = zeros(n,n); for i=1:n for j=1:n z = x(i) + y(j)*1i for k=1:t z = z - (64*z^7-112*z^5+56*z^3-7*z)/(448*z^6-560*z^4+168*z^2-7); end; r = 0; if (real(z)> 0.5) r = 1; end; if (imag(z)> 0.25) r = 2; end; if (imag(z)<-0.25) r = 3; end; M(j,i) = r; end; end; imagesc(x,y,M) colormap(hsv) colorbar('vert') % put the colormap scale on the right zoom on while 1 cmap = -1+MENU('Which colormap would you like?', ... 'EXIT NOW', ... 'hsv - Hue-saturation-value color map', ... 'hot - Black-red-yellow-white color map', ... 'gray - Linear gray-scale color map', ... 'bone - Gray-scale with tinge of blue color map', ... 'copper - Linear copper-tone color map', ... 'pink - Pastel shades of pink color map', ... 'white - All white color map', ... 'flag - Alternating red, white, blue, and black color map', ... 'lines - Color map with the line colors', ... 'colorcube - Enhanced color-cube color map', ... 'jet - Variant of HSV', ... 'prism - Prism color map', ... 'cool - Shades of cyan and magenta color map', ... 'autumn - Shades of red and yellow color map', ... 'spring - Shades of magenta and yellow color map', ... 'winter - Shades of blue and green color map', ... 'summer - Shades of green and yellow color map' ... ); if (cmap <= 0) break; end; switch(cmap) case 1, colormap('hsv') case 2, colormap('hot') case 3, colormap('gray') case 4, colormap('bone') case 5, colormap('copper') case 6, colormap('pink') case 7, colormap('white') case 8, colormap('flag') case 9, colormap('lines') case 10, colormap('colorcube') case 11, colormap('jet') case 12, colormap('prism') case 13, colormap('cool') case 14, colormap('autumn') case 15, colormap('spring') case 16, colormap('winter') case 17, colormap('summer') end end;