Write a MATLAB function for each exercises. Submission: Put all in one ZIP file . Grade: by effort 1) even_odd test if a number is even/odd Input: data-- an integer Output: [even odd] -- 1 if true, 0...

1 answer below »

Write a MATLAB function for each exercises.
Submission:Put all in one ZIP file.
Grade: by effort




1) even_odd
test if a number is even/odd
Input: data-- an integer
Output: [even odd] -- 1 if true, 0 otherwise
Example: [e o] = even_odd(4) --> e
Hint: find()


2) pos_num
Input: data -- an integer array
Output: ret -- number of positive numbers in data
Example: r = pos_num([0 -1 2 3]) --> 2
Hint: find()


3) rm_dup
remove duplicate element of an array
values having the same order
not using unique(data, 'stable');


Input: data -- an array
Output: ret -- resulting array
Example: r = rm_dup([1 2 2 3 1 2 2]) --> [1 2 3]
Hint: unique()


4) rm_dup in GUI
Two textfields and one button, no error check required



Answered Same DayJan 19, 2022

Answer To: Write a MATLAB function for each exercises. Submission: Put all in one ZIP file . Grade: by effort...

Sathishkumar answered on Jan 19 2022
121 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here