Unformatted text preview: end (Continued on reverse side of page) same = strcmp(s3,s2); 3. We want to make ‘count’ equal to the number of times ‘chuck’ appears in s1 and s2. c1 = length(strfind(s1,`chuck’)); c2 = length(strfind(s2,`chuck’)); count = c1+c2; s12 = s1 + s2; count = … length(strfind(s12,`chuck’)); s12 = strcat(s1,s2); count = … length(strfind(s12,`chuck’)); Problem 2. {6 points} For each of the following problems write a function that accomplishes the specified task using a counted (for) or conditional loop (while). Do *NOT* use quick and easy MATLAB commands (such as ‘find’) in solving these functions. Do not worry about error checking or comments. Be as concise as possible. All problems have relatively short solutions. 1. [2pts] Write a function ‘ThreeFiveSum’ which returns the sum of all multiples of...
View
Full Document
 Fall '08
 Stotts
 Nikon Coolpix S1, Nikon Coolpix S3, the00, a00

Click to edit the document details