CS 1371 Lecture Notes - Lecture 3: Grayscale, Function Word, Wrapper Function
Document Summary
%takes a waord, makes it lowercase, then passes int recursive function word = lower(wird_ out = r_ispalindrome(word0 end function out = r_ispalindrome(word) % 3 recursive call removing first and last letters from string. %keep this plot so can add another plot(x,y, k+") % black + for each point) plot(x,y, ro") % red o on each point as well plot3 to plot 3d line. % a * x = b where a is 3x3, x is 1x1, and b is 3x1 xdiv=a/b tdiv= toc tic xinv = inv(a) *b tinv = toc. %error a*xinv-b 0 norm(a*xdiv-b,2) norm(a*xinv-b,2) givensroot = [cosd(th) sind(th) %didnt reference the three color layers, so it collapses into grayscale, so for color: dogcrop=dog4(400:800, 300:600, [1,2,3]); dogsize = imresize(dog4([500,1000]) dogbw = im2bw(dog4) colormap() %create our own image r = 400; c = 600; flag = uint8(zeros(r,c,3)); %giaaaaaant matix with 3 channels, all zzeroes so black flag, add 255 to make white figure; imshow(flag)