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

📄 alert.m

📁 实现地震勘探中
💻 M
字号:
function alert(message,calling_program)% Function displays an alert message unless S4M.alert is set to false%% Written by: E. R.: August 3, 2001% Last updated: January 7, 2007: Optional second input argument%%          alert(message,calling_program)% INPUT% message  message to dispay (the message is preceeded by the string%          'Alert from "calling_program": ' %          where "calling_program" is the name of the program that called "alert".%          The message can be string of a cell array% calling_program  optional name of the function that issued the message;%          This is intended to specify a function name in case the alert %          is issued by a sufunction called by the function the user executed.global S4Mif S4M.alert   disp(' ')   if nargin == 1% 	Find name of the calling program       temp=dbstack;       if length(temp) > 1       % Alert is called from another program         program=name_of_calling_function(3);         if iscell(message)            disp([' Alert from "',program,'": ',message{1}])            for ii=2:length(message)               disp(['     ',message{ii}])            end         else            disp([' Alert from "',program,'": ',message])         end      else         if iscell(message)            disp([' Alert: ',message{1}])            for ii=2:length(message)               disp(['        ',message{ii}])            end         else            disp([' Alert: ',message])         end       end   else      disp([' Alert from "',calling_program,'": ',message])   end   disp(' ')end  

⌨️ 快捷键说明

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