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

📄 ccosine.m

📁 这是一个基于matlab开发的关于c语言的图形转换程序,可实现直方图的生成和传输
💻 M
字号:
function f = sinusoid(varargin)%CCOSINE Create a CCOSINE object.%   f = CCOSINE('Parameter1','Value1','Parameter2','Value2',...)%   create an object of class 'sinusoid' with the given parameters.%%   f = CCOSINE(Signal,'Parameter1','Value1','Parameter2','Value2',...)%   uses the CCOSINE object Signal as a template.%%   This function can be called with no arguments, or just a subset of%   parameter/value pairs as well.  In that case, default values are substituted.%%   Parameter Names / Default Values%   --------------------------------%   'Name'      'Cosine'%   'Amplitude'      1%   'Period'        10%   'Phase'          0%   'Length'        10%   'Delay'          0% Jordan Rosenthal, 05-Nov-1999
%             Rev., 26-Oct-2000 : Renamed to CCOSINEif (nargin > 0) & isa(varargin{1},'ccosine')   f = varargin{1};   varargin = varargin(2:end);   if nargin == 1, return;, endelse   f.Name = 'Cosine';   f.Amplitude = 1;   f.Period = 10;   f.Phase = 0;   f.Length = 10;   f.Delay = 0;endif nargin > 0   L = length( varargin );   if ( rem( L, 2 ) ~= 0 )      error('Parameter/Values must come in pairs.')   end   Param_Names = varargin(1:2:end);   Param_Vals = varargin(2:2:end);   for i = 1:length(Param_Names)      switch lower( Param_Names{i} )      case 'name'      , f.Name      = Param_Vals{i};      case 'amplitude' , f.Amplitude = Param_Vals{i};      case 'period'    , f.Period    = Param_Vals{i};         if f.Period <= 0, error('Period must be greater than 0.');, end      case 'phase'     , f.Phase     = Param_Vals{i};      case 'length'    , f.Length    = Param_Vals{i};         if f.Length<=0, error('Signal length must be greater than or equal to 0.');, end      case 'delay'     , f.Delay     = Param_Vals{i};      end   endendif ~isa(f,'ccosine');   f = class(f,'ccosine');end

⌨️ 快捷键说明

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