function [x] = holiday( month, day )M = [1,2,3,4,5,6,7,8,9,10,11,12];D = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];if nargin < 1 error('The input must be a positive integer');endif ~isscalar(month) || month <1 || month ~= fix(month) error ('The input "Month" must be positive integer');elseif ~isscalar(day) || day <1 || day ~= fix(day) error ('The input "Day" must be positive integer');end*if(M == 1 && D ==1) || (M == 7 && D == 4) || (M == 12) && D == 25) || (M == 12 && D == 31)* x = true;else x = false;endend
Matlab says that The text that i have made bold is wrong. Error occurs:,saying: Unexpected bracket or parenthesis.
Can anyone please clarify this for me?
Best Answer