could anyone help me to overcome the error in following code:

Answers (1)

Read about unique and sort. The term descend should be for sort.
function y=maxk(A,3)
A=sort(unique(A),'descend')
y=A(1:3)
end

1 Comment

KSSV the OP asks the same question again and again , why did you reopen the closed question ignoring the comment?

Sign in to comment.

Categories

Tags

Asked:

on 28 Mar 2019

Edited:

on 28 Mar 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!