Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [ itAppears] = PatternAppears( x,pattern )
- % This function helps to take a pattern that is being tested, and the
- % current sequence and will return true or false output, indicating wether
- % that pattern really appears.
- % Input = pattern ( The pattern being tested)
- % = x (The current sequence in the algorithm)
- % Output = itAppears ( True or false statment indicating wether the pattern
- % appears.
- %
- % Author: Muntdhar Al-Yassiri
- a = strfind(x,pattern);
- if a > 0
- itAppears = 1;
- disp(itAppears)
- else
- itAppears = 0;
- disp(itAppears)
- end
- return
RAW Paste Data