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

📄 insert.m

📁 这是伯克里wavelet transforms一书中的例子的代码
💻 M
字号:
function ar = insert(ls,dat,n)
%ar=insert(ar,en,n)
%This routine will insert the entry 'en', into the array 'ar' at 
%position 'n'. 
%
%Author: Ajit S. Bopardikar
%Copyright (c) 1998 by Addison Wesley Longman, Inc.
%

 len = length(ls); %length of the input
 
 if (n<=len)  %If the data needs to be inserted somewhere in the middle of the 
             %input list
   ar = [ls(1:n-1) dat ls(n:len)]; %insertion @ position n
 else        %If the data needs to be inserted somewhere after the end of the 
             %input list
   ar = ls;
   ar(n) = dat;
 end  %endif

⌨️ 快捷键说明

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