function area = areaof3ang(x1,y1,x2,y2,x3,y3)if nargin~=6 error(message('You need to input 6 values for 3 points. As in x1,y1,x2,y2,x3,y3'));endarea=abs((x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2))/2)end
When I deliberately input 2 variable, it shows me this error.
Error using messageInvalid Message ID format: 'You need to input 6 values for 3 points. As in x1,y1,x2,y2,x3,y3'.Error in areaof3ang (line 3) error(message('You need to input 6 values for 3 points. As in x1,y1,x2,y2,x3,y3'))
What am I doing wrong?
Best Answer