From: Rajeev Narayanan on 24 Feb 2010 18:59 Hello, I have a following program: Top.m and Parameter_Class.m. %Top.m ---------------Some Code---------------- Param=Parameter_Class; Parameter_Class.Param_Chk; %Parmeter_Class.m classdef Parameter_Class <handle properties (GetAccess = public) TRAC = input('\n\nNumber of Tracjectories: '); TIME = input('\nTotal Time T: '); NUMSIM = input('\n Number of Cycle NUMSIM: '); end methods function obj=Parameter_Class(TRAC, TIME, NUMSIM) obj.TRAC=TRAC; obj.TIME=TIME; obj.NUMSIM=NUMSIM; %STEPSIZE = obj.TIME/obj.NUMSIM; end function Param_Chk(obj) %::::::::::: read and check the keyboard inputs :::::::::::::::: [n1,n2]=rat(obj.TRAC); if(~isequal(n2,1) || isempty(obj.TRAC) || obj.TRAC <=0) error('The number of trajectories must be an integer and greater than zero'); end [n1,n2]=rat(obj.TIME); if(~isequal(n2,1) || isempty(obj.TIME) || obj.TIME <=0) error('TIME must be specified and must be an integer and greater than zero'); end [n1,n2]=rat(obj.NUMSIM); if(~isequal(n2,1) || isempty(obj.NUMSIM) || obj.NUMSIM <=0) error('NUMSIM must be specified and must be an integer and greater than zero'); end end end end When I excute the program the following error: ??? Input argument "TRAC" is undefined. Error in ==> Parameter_Class>Parameter_Class.Parameter_Class at 11 obj.TRAC=TRAC; Error in ==> ASDE_System at 35 Parameter_Class; % Simulation Parameters Somebody please help. I appreciate it. Thanks, rajeev
|
Pages: 1 Prev: need hel for project Next: radius of curvature for wind tunnel |