Question: MATLAB (strings, loops) An anagram is a word or phrase formed by rearranging the letters of another word or phrase. Examples include: listen silent cinema
MATLAB
(strings, loops) An anagram is a word or phrase formed by rearranging the letters of another word or phrase. Examples include: listen silent cinema ice man a telescope to see place Spaces obviously dont count when determining if two sets of words are anagrams. Case doesnt matter.
Write a function called anagram.m that compares two strings and returns 1 (logical true) if they are anagrams, and 0 (logical false) if they are not. You can use any built-in functions you like (and no, there isnt a built-in anagram function.)
Examples: >>
r = anagram('dormitory','dirty room')
r = 1 >>
r = anagram('yes','no')
r = 0
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
