A figure shows a triangle defined by the vertex coordinates (x1 ,y1 ) ,(x2 ,y2 ) , and (x3 ,y3 ). What command will interactively prompt a user for x and y coordinates at each of the triangle vertices. then how about draw the triangle and label it vertices. Next is compute and print the area of the triangle and its perimeter.
My solution is like this, please check for me ya...
if a > 0 & b > 0 & c > 0 & (a + b > c) & (a + c > b) & (b + c > a)
plot([x1 x2 x3 x1],[y1 y2 y3 y1])
disp('Not a triangle, please reinsert')
2nd question is about plotting functions :
How to create a variable t that takes values from 0 to 2pie with step size 0.001 . I already given de value of y. I wish to know how to plot and versus t in separate figures. What about plot and versus t in the same figure and use different colour for each graph and label each of them.
Then if I want to divide a figure in two by using the subplot command, then plot and in the upper part and in the lower part which all plots versus t. how ya??