Skip to content

Instantly share code, notes, and snippets.

@tokoro10g
Created August 5, 2019 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tokoro10g/9a3f1109dac72effd06498dffd7e6328 to your computer and use it in GitHub Desktop.
Save tokoro10g/9a3f1109dac72effd06498dffd7e6328 to your computer and use it in GitHub Desktop.
スターリンソートMATLABバージョン
clear
data = [1 2 2 1 1 4 3 9];
data(data<cummax(data))=[]
% -> [1 2 2 4 9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment