1
votes

I want to do essentially the operation "x = x + k" using a simulink model. The time used is fixed step discrete and I want x to be updated with each time step. k is a constant or a time varying value from a source block. The issue is also related to setting the initial value of x (for a single starting time step). The simulation is ideally supposed to run for infinite time. There are no concerns related to overflow of the buffer related to the variable x when large numbers are approached.

Please suggest what blocks I should use; if possible a diagram too. I think I need a block which can act as a source but also have an option to take an input by which it can be updated.

The final application is related to taking a signal as an input, updating at each discrete sample a few parameters according to the time-varying signal properties. I have done this in Matlab scripting and it was very easy there; but I need a Simulink model solution. Thank you in advance.

1

1 Answers

2
votes

perhaps I'm missing something but have you tried the memory block?

enter image description here