Murphy’s Law – abort

If there is one relatively good thing about Murphy’s Law is that it actually also may retunr an error: error in ‘murphysLaw’ at line 5: outcome(try) = min(stepForward) – sum(damage(anythingThatCanGoWrong(try)));       index exceeds matrix dimensions. I kept going, trying to ignore that two eye trackers have broken down, repairing one while  setting up the other one

Axiom I of experimental research: Murphy’s Law

Which can be wonderfully expressed as logical function of only a few parameters:

if ~isempty(possibleActions)

if remainingMotivation > 0,
attempts  = (1:remainingMotivation);

for try = 1:size(attempts,1),

outcome(try) = min(stepForward) – sum(damage(anythingThatCanGoWrong));
end

else
result = fail;
end

if max(outcome) < 0
result = fail;
else
result = impossibleError;
end

else

result = stagnation;

end

Should be MatLAB compatible….