Implements a computational experiment for a custom system defined as an xcos diagram
[SystemOutputChatacteristics,.. SystemProps]=ComputingExperiment(SystemOutputChatacteristicsNames,.. SystemShema,SystemParametrsNames,SystemParametrsValues,.. absolutTolErr,relativeTolErr,simulationTime,.. timeStepMax,Solver,toleranceTime)
Array of names of system output characteristics in xcos-diagram (see block TOWS_c). Array dimension 1xM
Xcos diagram of the user system (see type Xcos diagram structure)
The names of the system parameters in the xcos diagram (see the context property Xcos diagram structure). Array of strings of dimension 1xM
System parameter values in the xcos diagram (see the context property in Xcos diagram structure), specified by the corresponding SystemParametrsNames. Array of real numbers of dimension 1xM.
The absolute error of integration in xcos (see the tol (1) atol property in Xcos diagram structure). Positive real number
Relative error of integration in xcos (see the tol (2) rtol property in Xcos diagram structure). Positive real number
Simulation time in xcos (see the tf property in Xcos diagram structure). Positive real number
Maximum time integration step in xcos (see tol (7) hmax property in Xcos diagram structure). Positive real number
Solver view in xcos (see the tol (6) solver property in Xcos diagram structure). Is integer in the range from 0 to 100 - solver code
The time value error in xcos is the minimum time integration step (see the tol (3) ttol property in Xcos diagram structure). Positive real number
Cell-array (see cell-arrays) scilab-variables of the system output characteristics in an xcos-diagram, which are a data structure that includes time fields and value fields (see block TOWS_c). Array dimension 1xM
User-defined properties of a custom system xcos diagram (type Xcos diagram structure)
Simulates (computational experiment) a user system, specified in the form of an xcos diagram, for its various parameters (specified in the context).
Gives the dynamics of the user-specified output characteristics of the system (in the diagram, they are specified in the form of blocks TOWS_c) in the form of scilab variables of these blocks
//Forming the path to the xcos-diagram Proba1.zcos [a, pathlib] = libraryinfo("computing_experimentlib"); clear a; pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos'; pathdiagram = fullfile(pathlib, 'Proba1.zcos'); //Running a computational experiment SystemParametrsNames = ['b', 'd'];//Parameter names SystemParametrsValues = [1.5, 3.81];//Parameter values SystemOutputChatacteristicsNames = ['A1', 'A3', 'A2'];//Model Output Property Names SystemShema = xcosDiagramToScilab(pathdiagram);//System diagram [SystemModelOutputChatacteristics,..//System output characteristics SystemProps..//System properties ]=ComputingExperiment(SystemOutputChatacteristicsNames,...//Model output characteristics names SystemShema,...//System diagram SystemParametrsNames,...//Parameter names SystemParametrsValues,...//Parameter values 0.5E-6,..//Absolute error 0.7E-6,..//Relative error 10.0,..//Simulation time 0.8E-4,..//Maximum time integration step 1,..//Solver type 1E-10..//Time error ); //Result disp(SystemModelOutputChatacteristics); disp(SystemProps); | ![]() | ![]() |