Question: write in matlab with detailed solutions 5. Consider a triangle with vertices at (0,0), (1,0), and (0,1). Write a function with header [S] = myinside

write in matlab with detailed solutions
5. Consider a triangle with vertices at (0,0), (1,0), and (0,1). Write a function with header [S] = myinside Triangle(x,y) where S is the string 'outside' if the point (x,y) is outside of the triangle, 'border' if the point is exactly on the border of the triangle, and inside' if the point is on the inside of the triangle. Test Cases: >> S = myinside Trianle(.5,.5) S = border >> S = myinside Trianle(.25, .25) S= inside >> S = myinside Trianle(5, 5) S = outside
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
