This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % found in the 1st input string to the output word. You may assume that % only letters will precede this particular string. % 3) If an indices found from 1) and 2) are the same, simply include the % same referenced character twice. % 4) The letters specified in 1) and 2) should be assembled into the % output word in the order in which they originally appeared. % function sum = frankenstein(phrase, pattern) spaces = strfind(phrase, ' ')+1; % finding out what indices to add based on spaces embedded = strfind(phrase, pattern)-1; % finding out what indices to add based to imbedded pattern indices = sort([spaces embedded]); % putting the indices together then sorting them sum = phrase(indices);...
View Full Document
This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.
- Fall '08