Please kindly help me to write the matlab function code to calculate the power of the battery. Actually, the problem is that I have the I have a cost function whose output is battery power and there are several inputs. But the equation to calculate the input variables also depend on the output of previous time which is currently unknown. I can give you some example here:
where t=0:100 %time
I used for loop but still cannot get the result.
This is just the example but my problem is also similar. As we can see the input variable also depend on past output variable which is not yet calculated. How can write this in matlab function code. If anybody can help me, please I would be very thankful to him/her.
If you require my equation and given data, I would share that too. Please help me.