필터 지우기
필터 지우기

if this AND that then...

조회 수: 1 (최근 30일)
Brett
Brett 2012년 11월 28일
How do I say something like if value1 = 1 and value2 = 1 then... I'm trying to say that is something is a color and there is an arrow in a particular location then it will change the WaitSecs(value). This is what I have so far, but I'm not sure if that is saying what I intend it to.
if colour1 = c1
if tri1 = downtri
(keyCode(1,100)) == 1; %left
Screen('FillRect',window,[0 0 0])
Screen('Flip',window)
WaitSecs(tar);
elseif...
Thanks, you guys make my life WAY easier.
  댓글 수: 1
Jan
Jan 2012년 11월 28일
편집: Jan 2012년 11월 30일
(keyCode(1,100)) == 1; This is a comparison between the 100th element of a vector and 1. The output of the result is suppressed. Not really useful.

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

채택된 답변

Image Analyst
Image Analyst 2012년 11월 28일
if colour1 == c1 && tri1 == downtri
(keyCode(1,100)) == 1; %left
Screen('FillRect',window,[0 0 0])
Screen('Flip',window)
WaitSecs(tar);
  댓글 수: 4
Brett
Brett 2012년 11월 30일
I changed it into scalar values, now it works. :)
if q1tri == 1 && q1col == 1 && keyCode(1,98) == 1 %down
Screen('FillRect',window,[0 0 0])
Screen('Flip',window)
WaitSecs(tar);
Image Analyst
Image Analyst 2012년 11월 30일
OK great - go ahead and mark this question as "Answered" then.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by