Question
matlab

3. Filename: area2d.m The area of a triangle whose three vertices are points (x1, yı), (X2, y2), and (x3, y3) can be found us
0 0
Add a comment Improve this question Transcribed image text
Answer #1

function [A] = area2d(a,b,c) if nargin == 1 A=a2/sqrt(3) elseif nargin=-2 A =a*b/2 if c<=a-b error(c is too small.) end if

Add a comment
Know the answer?
Add Answer to:
matlab 3. Filename: area2d.m The area of a triangle whose three vertices are points (x1, yı),...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • iii. If the vertices of a triangle, in counterclockwise order are (x1.yı), (X2,Y2) and (x3 ,Y3),...

    iii. If the vertices of a triangle, in counterclockwise order are (x1.yı), (X2,Y2) and (x3 ,Y3), Show that the area of the triangle is A= }((x, y, – x, y;)+(x,y; – x, y,)+(x; y; – x, y,)). [5%) iv. Use Part iii to find the area of the triangle with vertices (0,0); (2,0) and (0,2), then, check the result geometrically. [5%)

  • x1 X2 X3 Atnangle has vertices (x1y1)(X2 y2) and X3 Уз) The area of the triangle...

    x1 X2 X3 Atnangle has vertices (x1y1)(X2 y2) and X3 Уз) The area of the triangle IS given by the absolute value of D where D: y1 y2 y3 Use this formula to find the area of a triangle with vertices (6,8), (8,2), and (9,6) The area is square unit(s) Enter your answer in the answer box O Type here to search

  • 3) Let (x, y), (X2, y2), and (X3. Y3) be three points in R2 with X1...

    3) Let (x, y), (X2, y2), and (X3. Y3) be three points in R2 with X1 < x2 < X3. Suppose that y = ax + by + c is a parabola passing through the three points (x1, yı), (x2, y), and (x3, Y3). We have that a, b, and c must satisfy i = ax + bx + C V2 = ax + bx2 + c y3 = ax} + bx3 + c Let D = x X2 1....

  • = = 3, Cov(X1, X2) = 2, Cov(X2, X3) = -2, Let Var(X1) = Var(X3) =...

    = = 3, Cov(X1, X2) = 2, Cov(X2, X3) = -2, Let Var(X1) = Var(X3) = 2, Var(X2) Cov(X1, X3) = -1. i) Suppose Y1 = X1 - X2. Find Var(Y1). ii) Suppose Y2 = X1 – 2X2 – X3. Find Var(Y2) and Cov(Yı, Y2). Assuming that (X1, X2, X3) are multivariate normal, with mean 0 and covariances as specified above, find the joint density function fxı,Y,(y1, y2). iii) Suppose Y3 = X1 + X2 + X3. Compute the covariance...

  • Write a program that prompts the user to enter three points (x1, y1), (x2, y2), (x3,...

    Write a program that prompts the user to enter three points (x1, y1), (x2, y2), (x3, y3) of a triangle and displays its area. The formula for computing the distance of two points (x1, y1) and (x2, y2) is d = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); or d = Math.pow((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1), 0.5); The formula for computing the...

  • I need the solution of this question asap 3, Cov(X1, X2) = 2, Cov(X2, X3) =...

    I need the solution of this question asap 3, Cov(X1, X2) = 2, Cov(X2, X3) = -2, 5. Let Var(x1) = Var(X3) = 2, Var(X2) Cov(X1, X3) = -1. i) Suppose Y1 = X1 - X2. Find Var(Y1). ii) Suppose Y2 = X1 – 2X2 – X3. Find Var(Y2) and Cov(Y1, Y2). Assuming that (X1, X2, X3) are multivariate normal, with mean 0 and covariances as specified above, find the joint density function fyy, y,(91, y2). iii) Suppose Y3 =...

  • Q2 Suppose X1, X2, X3 are independent Bernoulli random variables with p = 0.5. Let Y;...

    Q2 Suppose X1, X2, X3 are independent Bernoulli random variables with p = 0.5. Let Y; be the partial sums, i.e., Y1 = X1, Y2 = X1 + X2, Y3 = X1 + X2 + X3. 1. What is the distubution for each Yį, i = 1, 2, 3? 2. What is the expected value for Y1 + Y2 +Yz? 3. Are Yį and Y2 independent? Explain it by computing their joint P.M.F. 4. What is the variance of Y1...

  • Let C be a triangle in the x-y plane with vertices (x1,y1), (x2y2) and (x3,y3) arranged so that C...

    Let C be a triangle in the x-y plane with vertices (x1,y1), (x2y2) and (x3,y3) arranged so that C is positively-oriented. Let C be a triangle in the xy-plane with vertices (x,y), (z2,p), and (z3,U3) arranged so that C is positively-oriented. a.) Sketch such a triangle and indicate its orientation. b.) Apply Green's Theorem to compute the area of the triangle as a (sum of) path integral(s) around the boundary. Get a formula for area in terms of the coordinates...

  • Find an orthogonal change of variables that eliminates the cross product terms in the quadratic form...

    Find an orthogonal change of variables that eliminates the cross product terms in the quadratic form Q, and express Q in terms of the new variables. 7x{ + 6x2 + 5x3 - 4X1X2 + 4x2X3 A substitution x = Py that eliminates cross-product terms is X1 = o A substitution x = Py that eliminates cross-product terms is Xi = – -}y.+3y2– žys, x2 = - - Žy2+3y2 +3v3, x3 = - {yı+ {y2– žv3. The new quadratic form is...

  • 9. A triangle is described by its "corners" in the order (< x1, yı >, < x2, Уг >, < x31%-) and d...

    9. A triangle is described by its "corners" in the order (< x1, yı >, < x2, Уг >, < x31%-) and drawn on a display screen using lines from < xı'yı > to < x2,Y2 >; < x2,U2 > to < x3,U3 >; and, finally, from < x3, уз > to < x1, yı > . A 3 3 matrix. 1 0 10 0 1 -20 is used to move this shape 10 places right and 20 places down....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT