Write a MATLAB function for each exercises.
Grade: by effort
1) is_palindrome
Input: str -- a string
Output: ret -- 1 if str is a palindrome, 0 otherwise
Display: YES / NO
Example: r = is_palindrome('aabbcc') --> 0
Hint: fliplr()
2) is_subset
test if A is a subset of B
Input: A, B -- array
Output: ret -- 1 if A is a subset of B, 0 otherwise
Example: r = is_subset([2 3], [3,2,1]) --> 1
Hint: ismember()
3) remove
remove every element of A from B, ALSO, DO NOT CHANGE B after function call!
Input: A, B
Output: ret
Example: r = remove([1,1], [1,2,1,2]) --> [2 2]
Hint: find()
4) all_in
Input: A, B -- arrays
Output: ret -- 1 if all element in A is in B, 0 otherwise
Example: r = all_in([1 1 2], [1 2 3]) --> 0
Hint: remove()