Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Elimination of transition portion of a sampled logical channel
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!