Question: Given an integer vector x , define a function named Duplicate whose output is a vector y that have all the duplicated elements. The sequence

Given an integer vector x, define a function named Duplicate whose output is a vector y that have all the duplicated elements.
The sequence of element in y should be in ascending order
For example
x=[4,3,2,3,7,8,2,3,1]
y=Duplicate(x)
y=[2,3]
Function
Save
C Reset
MATLAB Documentatic
Code to call your function (3)
\table[[,x=randi(20,1,20)
Given an integer vector x , define a function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!