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

📄 f_getmatfile.asv

📁 DSP程序 Matlab是一套用于科学工程计算的可视化高性能语言与软件环境。它集数值分析、矩阵运算、信号处理和图形显示于一体
💻 ASV
字号:
function [fname,fexist] = f_getmatfile (default,prompt); 

%F_GETNATFILE: Prompt the user for the name of an M-file function
%
% Usage: [fname,exist] = f_getmatfile (default,prompt)
%
% Inputs: 
%         default = string containing name of default MAT-file function 
%         prompt  = prompt string
%
% Outputs: 
%          fname = string containing name of MAT file (no .MAT)
%          fexist = nonzero if file exists, zero otherwise
%
% See also: F_GETMAT

% Prompt for name of MAT-file

ver  = version;
if all(ver(1:3) == '6.1')
    [user,path] = uigetfile ('.mat',prompt);
else
    [user,path] = uigetfile ('*.mat',prompt,default);
end


if nargin < 2
   [fname,pname] = uigetfile ('*.mat','Select MAT-file',default);
else
   [fname,pname] = uigetfile ('*.mat',prompt,default);
end

% Check for no response

if prod(size(fname)) == 0
   fname = default;
end

% Check if file is in MATLAB path

if exist([fname '.M']) == 2
   fexist = 1;
else
   fexist = 0;
end


   caption = 'Select MAT file containing x,fs,a,b';
   ver  = version;
   if all(ver(1:3) == '6.1')
       [user,path] = uigetfile ('.mat',caption);
   else
       [user,path] = uigetfile ('*.mat',caption,user);
   end
   if ~isequal(user,0)
       old_path = pwd;
       cd (path);
       load (user)
       cd (old_path)
   end
   N = length(x);
   if N > N_max
      x(N+1:M_max) = [];
      N = N_max;
   end

⌨️ 快捷键说明

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