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

📄 deblankall.m

📁 信号实验常用的simulink模型和mfile,可直接在matlan下运行。
💻 M
字号:
function s1 = deblankall(s)
%DEBLANKALL Remove heading and trailing blanks in the string.
%   DEBLANKALL(S) removes blanks from string S.
%
%   DEBLANKALL(C), when C is a cell array of strings, removes the 
%   blanks from each element of C.
%
%   DEBLANK was modified by axz

if ~isempty(s) & ~isstr(s)
    warning('Input must be a string.')
end

if isempty(s)
    s1 = s([]);
else
  % remove heading and trailing blanks
  [r,c] = find(s ~= ' ' & s ~= 0 & s ~= ' ');
  if isempty(c)
    s1 = s([]);
  else
    s1 = s(:,min(c):max(c));
  end
end

⌨️ 快捷键说明

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