Deprecated: Constant E_STRICT is deprecated in /home/polpe/public_html/system/core/Exceptions.php on line 75

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 101

Backtrace:

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 127

Backtrace:

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$hooks is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$config is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$log is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$uri is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$router is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$output is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$security is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$input is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$lang is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$load is deprecated

Filename: core/Controller.php

Line Number: 78

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$parser is deprecated

Filename: core/Loader.php

Line Number: 1290

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 1290

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$MyModel is deprecated

Filename: core/Loader.php

Line Number: 353

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 289

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: drivers/Session_files_driver.php

Line Number: 94

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 108

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 141

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$session is deprecated

Filename: core/Loader.php

Line Number: 1290

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$parser is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$MyModel is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$session is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

Polcz Péter honlapja

Tartalomjegyzék

Heat equation with ode45

Teljes Matlab script kiegészítő függvényekkel.

Approximate solution of the heat equation with |ode45| by considering the discretization along the spacial coordinate.

File: ccs_TG_hovezetes_PDE_megoldas_ode45.m
Directory: 4_gyujtemegy/11_CCS/_1_ccs/dynamic_system_simulations
Author: Peter Polcz (ppolcz@gmail.com)
Created on 2018. September 17.

Heat equation with a simple initial condition

$u'_t = k u''_{xx}$, where $k=1$. Initial condition: $u(x,0) = 1;

Let me discretize this equation about the spatial parameter $x$:

$$u''_{xx}[k] \simeq \frac{u[k+1] - 2 u[k] + u[k-1]}{(\Delta x)^2}$$

Therefore the PDE can be approximated by the following finite number of ordinary differential equations:

$$\pmqty{u'_t[0] \\ ... \\ u'_t[N-1]} = \pmqty{ -2 & 1 & 0 & ... & 0 \\ 1 & -2 & 1 & ... & 0 \\ ... & ... & ... & ... & ... \\ 0 & ... & 0 & -2 & 1 } \pmqty{u[0] \\ ... \\ u[N-1]}$$

Let the state vector $x$ be:

$$x = \pmqty{u[0] \\ ... \\ u[N-1]}, ~~\text{ and }~~ A = \pmqty{ -2 & 1 & 0 & ... & 0 \\ 1 & -2 & 1 & ... & 0 \\ ... & ... & ... & ... & ... \\ 0 & ... & 0 & -2 & 1 }$$

Then we have a linear autonomous system of ODEs: $\dot x = A x$. Note that matrix $A$ is a Toeplitz matrix due to its special diagonal structure.

% Nr of sample points;
N = 15;

% L = 10 meters long;
L = 10;

Dx = L / (N-1);

A = toeplitz([-2 1 zeros(1,N-2)]) / Dx^2;
B = [1 0 ; zeros(N-2,2) ; 0 1];
C = eye(N);
Cn = ctrb(A,B);
rankCn = rank(Cn)

f = @(t,x) A*x;

[t,y] = ode45(f, linspace(0,30,70), ones(N,1));

figure, surf(y)
Output:
rankCn =
    15

Controlled heat equation

K = lqr(A,B,10*eye(N),eye(2));

f = @(t,x) (A-B*K)*x;

[t,y] = ode45(f, linspace(0,30,70), ones(N,1));

figure, surf(y)