Error "Not enough input arguments"
이전 댓글 표시
Hi,
I'm new to Matlab and am having trouble getting the following bit of script to work:
for i = 1:240;
if shape1_win(i)==1 & shape1_loss(i)==1 & button_pressed(i)==1 | shape2_win(i)==1 & shape2_loss(i)==1 & button_pressed(i)==2;
choose_both(i)=1;
else
choose_both(i)=0;
end
end
The script is for a task in which participants have to choose a shape that can have a win, a loss, or both. What I want to do is create a new variable listing all the times participants chose a shape that had both a win and a loss. The shape variables are all 240x1 double type variables.
Every time I try to run this bit, I get an error saying there are not enough input arguments (starting on line 2). I'm probably missing something very obvious, could someone explain to me how to fix this?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!