Question
Can i write polynomial equation in STM32cubeIDE
Hello,
I am trying to estimate initial SOC of battery by using a polynomial equation obtained from discharged voltage data of battery. I successfully run this polynomial equation in MATLAB but don't know how to write in STM32cubeIDE.
The obtained polynomial equation is-
p1 = 9.722*10^(-24);
p2 = -1.565*10^(-19);
p3 = 9.908*10^(-16);
p4 = -3.139*10^(-12);
p5 = 5.22*10^(-9);
p6 =-4.318*10^(-6);
p7 = 0.00127;
p8 = 3.709;
x=4;
j = p1*(x.^7)+p2*(x.^6)+p3*(x.^5)+p4*(x.^4)+p5*(x.^3)+p6*(x.^2)+p7*(x)+p8Here 'j' is polynomial equation and 'x' is initial voltage of battery.
Thanks.