diff options
author | siddhu8990 | 2017-05-22 15:13:54 +0530 |
---|---|---|
committer | siddhu8990 | 2017-05-22 15:13:54 +0530 |
commit | 02a004ea1500c403ac1a18a52aaf79aaeb7280ed (patch) | |
tree | 5e55f872e363922a21ad91165628e68e16fea8a3 /2.3-1/src/c/CACSD/lqe | |
parent | 5f17dffbfa6d84aee23f7946cfa95e9e5c9995b7 (diff) | |
parent | de82d12658979cd70439f977742f80fac9f6521f (diff) | |
download | Scilab2C-02a004ea1500c403ac1a18a52aaf79aaeb7280ed.tar.gz Scilab2C-02a004ea1500c403ac1a18a52aaf79aaeb7280ed.tar.bz2 Scilab2C-02a004ea1500c403ac1a18a52aaf79aaeb7280ed.zip |
Bugs fixed for Scilab 6.0
Diffstat (limited to '2.3-1/src/c/CACSD/lqe')
-rw-r--r-- | 2.3-1/src/c/CACSD/lqe/dlqea.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/2.3-1/src/c/CACSD/lqe/dlqea.c b/2.3-1/src/c/CACSD/lqe/dlqea.c index bc729fb9..63f8d62d 100644 --- a/2.3-1/src/c/CACSD/lqe/dlqea.c +++ b/2.3-1/src/c/CACSD/lqe/dlqea.c @@ -12,6 +12,7 @@ /*Function for calculating lqe gain. Refer 'lqe.sci' in scilab source.*/ +#include <stdlib.h> #include "lqr.h" #include "matrixTranspose.h" @@ -24,8 +25,8 @@ void dlqea(double* sys, int sys_rows, int sys_cols, double* X, double* K) int sys_lqr_cols = sys_rows + 2; int no_of_ip, no_of_st; - no_of_ip = sys[sys_rows*(sys_cols-1)+1]; - no_of_st = sys[sys_rows*(sys_cols-1)]; + no_of_ip = (int)sys[sys_rows*(sys_cols-1)+1]; + no_of_st = (int)sys[sys_rows*(sys_cols-1)]; /*Transpose given system and calculate LQR with new system. Transpose result got from LQR*/ |