Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Elimination of transition portion of a sampled logical channel

1 回表示 (過去 30 日間)
pietro
pietro 2014 年 2 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi all,
I have some sampled signals measured from the CAN-Bus. It's a logical channel, it ranges from 0 to 12, only integer numebers are allowed. Unfortunately the signals is sequential so during a transition from a state to another one it assumes all values included between them. So if the real signal should be A=[zeros(1,100) 5*ones(1,4000) 2*ones(1,500)], it's equal to B=[zeros(1,100) 1 2 3 4 5 6 7 8 9 10*ones(1,4000) 9 8 7 6 5 4 3 2*ones(1,6000)]. The problem is a bit more complex because in some conditions, the transition is sligthly slower so some values in between two states are repeated, so it might be: C=[zeros(1,100) 1 2 2 2 3 4 5 6 6 6 7 8 9 10*ones(1,4000) 9 8 7 7 7 7 6 5 4 4 4 4 3 2*ones(1,6000)]. There should be less than 10 reapeted numbers during a state transition.
I need to compute the array A from the array C. How could I do it without using any loop because the signals are quite big?
Thanks is advance
Cheers
Pietro

回答 (0 件)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by