The following code returns the error after it (ignore the "if true % code end" part):
if true % code
end%%%%%%%%%_CODE_%%%%%%%%%
playORquit=5if playORquit ~= 1 fprintf('THANK YOU FOR PLAYING GUESS-TRON!\n'); fprintf('Here are your results...\n'); fprintf('Number of Trials: %d\n', trial);end%%%%%%%%%_ERROR_%%%%%%%%%
Index exceeds matrix dimensions.Error in TEST_youcandelete (line 2) fprintf('THANK YOU FOR PLAYING GUESS-TRON!\n');%%%%%%%%%%%%%%%%%%%%%%%%%
How do I have those strings printed if 'playORquit' doesn't equal '1'
Best Answer