I want to shift an array within stateflow by one element.
In matlab, I would use circshift or this code:
>> x = [1:5]
x =
1 2 3 4 5
>> x(2:end) = x(1:end-1)
x =
1 1 2 3 4
>> x(1) = 0 % New Value
x =
0 1 2 3 4
How can I implement this in stateflow action language. Embedded matlab-function is not possible because of realtime-target.
I tried this:
{x[2:end] = x[1:end-1];
x[1] = 0;}
but thats a syntax error. For loop should be possible as well, but thats strange to me in matlab :-)
Thanks in advance