root/applications/dual/SIDP/SIDPS/motor_sidps/interpol.asv
@
1264
Revision 1249, 452 bytes (checked in by zimamiro, 14 years ago) |
---|
Line | |
---|---|
1 | function rizeni=interpol(beta,H,C,H_tilde_on) |
2 | for |
3 | pom=H-beta(4,5); |
4 | if (pom(1)>0) |
5 | rizeni=C(1); |
6 | else |
7 | if (pom(end)<0 || pom(end)==0) |
8 | rizeni=C(end)*2^pom(end); |
9 | else |
10 | for i=2:size(H,2) |
11 | if (pom(i)>0) |
12 | delka=H(i)-H(i-1); |
13 | rizeni=(1+pom(i-1)/delka)*C(i-1)+(1-pom(i)/delka)*C(i); |
14 | break |
15 | end |
16 | end |
17 | end |
18 | end |
19 | |
20 | end |
Note: See TracBrowser
for help on using the browser.