<< ModelingSystemDynamicTimeGrid computing_experiment

computing_experiment >> computing_experiment > SetDiagramParameters

SetDiagramParameters

Specifies the user options of the user system specified as an xcos-diagram

Syntax

[SystemShema]=SetDiagramParameters(SystemShema,SystemParametrsNames,SystemParametrsValues[,..
absolutTolErr[,relativeTolErr[,simulationTime[,..
timeStepMax[,Solver[,toleranceTime]]]]]])
[SystemShema]=SetDiagramParameters(SystemShema[,absolutTolErr[,relativeTolErr[,simulationTime[,..
timeStepMax[,Solver[,toleranceTime]]]]]])

Arguments

SystemShema

Xcos diagram of the user system (type Xcos diagram structure) or custom chart file (.xcos, .zcos extension)

SystemParametrsNames

The names of the system parameters in the xcos diagram (see the context property Xcos diagram structure). Array of strings of dimension 1xM

SystemParametrsValues

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.

absolutTolErr

The absolute error of integration in xcos (see the tol (1) atol property in Xcos diagram structure). Positive real number

relativeTolErr

Relative error of integration in xcos (see the tol (2) rtol property in Xcos diagram structure). Positive real number

simulationTime

Simulation time in xcos (see the tf property in Xcos diagram structure). Positive real number

timeStepMax

Maximum time integration step in xcos (see tol (7) hmax property in Xcos diagram structure). Positive real number

Solver

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

toleranceTime

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

Return values

SystemShema

xcos-diagram of the user system (type Xcos diagram structure) with user-specified properties

Description

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).

Examples

//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);

See also


Report an issue
<< ModelingSystemDynamicTimeGrid computing_experiment