diff options
author | siddhu8990 | 2017-05-22 15:13:54 +0530 |
---|---|---|
committer | siddhu8990 | 2017-05-22 15:13:54 +0530 |
commit | b33afdb2311fbe8aad4c5c614c6098585fe2d279 (patch) | |
tree | 3d8db91388dab60159248fb0cfef160ca03cefeb /src/c/CACSD/lqe | |
parent | f0e074cc43f04f58aafe00742b9748a09f77894f (diff) | |
parent | e36eac94dd517bb69d3e5782516ee58942451991 (diff) | |
download | scilab2c-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.gz scilab2c-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.bz2 scilab2c-b33afdb2311fbe8aad4c5c614c6098585fe2d279.zip |
Bugs fixed for Scilab 6.0
Diffstat (limited to 'src/c/CACSD/lqe')
-rw-r--r-- | src/c/CACSD/lqe/dlqea.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/c/CACSD/lqe/dlqea.c b/src/c/CACSD/lqe/dlqea.c index bc729fb9..63f8d62d 100644 --- a/src/c/CACSD/lqe/dlqea.c +++ b/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*/ |