root/applications/dual/SIDP/transformace/ce.m @ 1045

Revision 862, 445 bytes (checked in by zimamiro, 15 years ago)
Line 
1function [ztrata u y b P]=ce(regulator_parameters,system,apriori)
2
3horizont=regulator_parameters.horizont;
4
5y=zeros(horizont);
6b=zeros(horizont);
7P=zeros(horizont);
8u=zeros(horizont);
9ztrata=0;
10
11y(1)=apriori(1);
12b(1)=apriori(2);
13P(1)=apriori(3);
14
15for i=1:horizont-1
16    u(i)=(system.yr(i)-y(i))/b(i);
17    [y(i+1) b(i+1) P(i+1)]=get_next([y(i) b(i) P(i)],u(i),system);
18    ztrata=ztrata+(y(i+1)-system.yr(i+1))^2;
19end
20
21end
22
Note: See TracBrowser for help on using the browser.