Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write code in Matlab or Octave! 1 of 2 Engineering Modeling and Design Dr. Ashuri Lab Assignment 4 Problem 1: One of the most

Please write code in Matlab or Octave! image text in transcribed
1 of 2 Engineering Modeling and Design Dr. Ashuri Lab Assignment 4 Problem 1: One of the most important mathematical problems through all times has been to find the area of a polygon, especially because real estate areas often had the shape of polygons, and it was necessary to pay tax for the area. We have a polygon as depicted below. The vertices ("corners") of the polygon have coordinates (x, y), (x2. Y), ..., (x, y), numbered either in a clockwise or counter clockwise fashion. The area A of the polygon can amazingly be computed by just knowing the boundary coordi- nates: (x1 + xy + ... + xy + xy) -(yx2 + y2x3 + ... + Yn-1X + Yn 1) Write a function polyarea(x, y) that takes two coordinate arrays with the ver- tices as arguments and returns the area. Assume that x and y are either lists or arrays. Test the function on a triangle, a quadrilateral, and a pentagon where you can calculate the area by alternative methods for comparison Filename: polyarea.m

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

How does a CDO differ from an ABS transaction?

Answered: 1 week ago

Question

=+X. Is it feasible to perform Function X? For instance,

Answered: 1 week ago