how many changes are there?

조회 수: 5 (최근 30일)
Gisella Decarli
Gisella Decarli 2016년 7월 22일
편집: Stephen23 2016년 8월 1일
I have this kind of data (column 1-2-3, respectively):
Right= [1 1 1 0 0 0 0 0 1 0 1 1 1]
Center=[0 0 0 1 1 1 0 0 0 1 0 0 0]
Left= [0 0 0 0 0 0 1 1 0 0 0 0 0]
I want to count how many changes there are between right and left, not considering the center. In my example there are 2 changes in total from right to left and from left to right. Thank you in advance.
  댓글 수: 3
Thorsten
Thorsten 2016년 7월 22일
What exactly are the "2 changes in total from right to left and from left to right"? Please expand.
Gisella Decarli
Gisella Decarli 2016년 8월 1일
Here attached you can find an exemple of data. 1 means that subject is looking at the screen (left, right or center) and 0 that is not looking. So, I want to know how many times a subject switches the eyes from right to left and from left to right, not considering the center column. E.g. in the file (Trial5), here attached, the first switch is from right to left at 3.2,the second at 19.5 from right to left, the third at 20.4 from left to right and the fourth at 22.2 from right to left), so, in total there are 4 switches. Hope you will understand now. Thank you!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by