📄 insert.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 + -