strings2.m

来自「matlab算法集 matlab算法集」· M 代码 · 共 23 行

M
23
字号
function c = strings2 (a,b)
%----------------------------------------------------------------
% Usage:       c = strings2 (a,b)
%
% Description: Contatinate string b to the end of string a
%
% Inputs:      a = initial string 
%              b = string to add to the end of a
%
% Outputs:     c = strings a and b contatinated 
%
% Note:        This is a Matlab 4.0 replacement for the strcat 
%              function in Matlab 5.0
%----------------------------------------------------------------
   na = length (a);
   nb = length (b); 
   c = a;
   for i = 1 : nb
      c(na+i) = b(i);
   end
%----------------------------------------------------------------

⌨️ 快捷键说明

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