필터 지우기
필터 지우기

How to create a Stroop (conflicting condition) simulation?

조회 수: 2 (최근 30일)
Katherine Regalado Rosales
Katherine Regalado Rosales 2020년 9월 10일
댓글: Mahesh Taparia 2020년 9월 17일
Here is the initial code:
clear
close all
nTrials=10;
blue=imread('blue.png');
%use this line only on desktop MATLAB %comment out or delete for Online or Mobile f=figure('WindowStyle','docked');
%loop
for i=1:nTrials
clc %clear console
%word used on this trial
word=blue;
%change its color: remember, R, G, B word=255-word;
word(:,:,3)=0;
word=255-word;
%show the word
imshow(word)
%collect input
input('What color?','s');
end
%we're done!
close all
and we're supposed to use red.png,magenta.png,cyan.png,green.png, and set word to randi(5,1) so that the output is randomized.
  댓글 수: 1
Mahesh Taparia
Mahesh Taparia 2020년 9월 17일
Hi
Its not clear what you want to do exactly. Can you explain once,?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by