Specifies the user options of the user system specified as an xcos-diagram
[SystemShema]=SetDiagramParameters(SystemShema,SystemParametrsNames,SystemParametrsValues[,.. absolutTolErr[,relativeTolErr[,simulationTime[,.. timeStepMax[,Solver[,toleranceTime]]]]]]) [SystemShema]=SetDiagramParameters(SystemShema[,absolutTolErr[,relativeTolErr[,simulationTime[,.. timeStepMax[,Solver[,toleranceTime]]]]]])
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
xcos-diagram of the user system (type Xcos diagram structure) with user-specified properties
Sets the values of the user-specified parameters of the user system, specified as an xcos diagram, for its various parameters (given in the context).
//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 [SystemShema]=SetDiagramParameters(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(SystemShema); | ![]() | ![]() |