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!