Why does the Simulink memory block delay the data by more than 1 iteration?

5 views (last 30 days)
What I need to do is input the data from a previous iteration and the current iteration into a function and then do some vector analysis on these numbers. The setup is as follows: A vector A is x-y co-ordinates and is calculated by another function. This is fine. I need A(t) and A(t-1) to be inputted. But instead, with a memory block, or unit delay, I am getting A and A(t-10) (10 being a rough estimate, its around that, and its most certainly not the iteration just passed). Is there any way to make the memory block delay for just a single iteration. On R2011a, windows and mac if it matters.

Answers (1)

TAB
TAB on 18 Apr 2012
For Unit Delay block ---> Set the sample time of block to -1 (Inherited).
For Memory block ---> Select the "Inherited sample time" checkbox.

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!