**7. Implementation of the WRIM and the PCA models in the Matlab software**

The differential equations system governing the WRIM is composed of linear differential equation which has the following form:

$$\frac{dy}{dt} = f(y) \tag{31}$$

Pre-programmed solvers are available in the Matlab software to solve easily this type of equation. These pre-programmed functions (ode45, ode113 …) proposed by the software helped to solve correctly with scalable computation time by the number of data to be processed. We adopted "*ode45*", solver based on the Runge-Kutta 4, 5 numerical resolution method. After creating a function detailing the differential equation system, we have to use it in the chosen solver to calculate numerically the equations governing the WRIM.

The following extract lines of code illustrate the use of the pre-programmed function "*ode45*" (Figure 18):


The differential equations system is established in the "*Diff\_Equa\_WRIM*" function.

One of the major strengths of Matlab is the matrix manipulation. With the amount of data in matrix form that we consider in this paper, this feature of the software allows us to treat easily and without complexity these data. Thus, for the ACP method, matrix manipulations are done by simple operations because all variables in Matlab are intrinsically represented by matrix forms. In addition, pre-programmed functions are available to perform some precise operations such as the descendant sorting with "*descend*" function.

And finally, Matlab offers a multitude of possibilities for graphic representations. At the end of the PCA process, the original data and those from the treatment are represented graphically. This allowed more comparative studies as well as quantitative and qualitative analysis of the entire device. A function was reserved to the automatic superposition of curves of the same variables for the different considered defaults.

To summarize, three major functions have been developed to carry out the approach:

resolution of de differential equations system governing the WRIM,


We would like to note that each approach has been developed as a separate function, but our program runs automatically. These functions are executed automatically, one after the other, in another function.
