⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myunique.m

📁 实现地震勘探中
💻 M
字号:
function [out,index]=myunique(in)% Remove duplicates from "in" in such a way that the last one is retained% % Written by: E. R.: December 2, 2006% Last updated:%%        out=myunique(in)% INPUT% in     cell vector of strings% OUTPUT% out    input cell vector with leading duplicates removed% index  index such that out=in(index)%% EXAMPLE%       a=[2 3 4 3 1 3 6];%       [b,index]=myunique(a)global S4Mif S4M.matlab_version > 7.2   [dummy,index]=unique(in,'last'); %#ok  First output argument is not requiredelse   [dummy,index]=unique(in);        %#ok  First output argument is not requiredendindex=sort(index);out=in(index);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -