SOLVED: Please code in MATLAB, and do not use any sort of functions to generate circles or lines, or to compute Hough transforms. To start off with, let's generate some fake edge data so that we know what the solution is. Create a 400x400 binary image t (2024)

00:01 Hello student, here eclipse is given to us and x and y component of an eclipse can be calculated using the formula.

00:07 Here i have written the formula x equal to x component we can calculate by with the help of a into sine t and y component we can calculate with the help of b into cos t.

00:17 So x and y can be calculated.

00:19 So now we have to make a script that asks the user for the radius of the x component and the radius of the y component and both radius must be in centimeter.

00:29 And after this plot the eclipse in the term of x and y one plot and plot the x and y component in terms of t on the second plot in the same figure and the eclipse plot should be to the left of the component plot.

00:44 So the component plot should be use a dotted line for the x component and a circle mark for the y component then compute the area of the eclipse based on the equation.

00:55 So here now we have to display the area also and area must be in a three decimal place to the right and the eight digit to the right of the decimal place.

01:08 So fill any empty space with the zeros.

01:11 So here i am writing this program into the python and here we can plot an eclipse and its component to calculate and display its area.

01:22 So here i am importing some file.

01:26 These are matplotlib .pyplot as a plt and import numpy as a np.

01:31 So these are we have included in our program because we are doing some mathematical calculation that's why numpy is added and we have to do the some plotting work that's why matplotlib i have included.

01:44 So here def plot eclipse this is the function plot underscore eclipse which is using two arguments a and b.

01:53 So what is this doing? plot an eclipse with the radius a in the x direction and the radius b in the y direction arguments here a equal to the radius in the x direction and b is the radius in the y direction.

02:08 So this is written in the comment here for a multiple line comment in the python we use this symbol.

02:15 So here now i have taken np .linespace.

02:19 So line space i am using here.

02:24 So zero two arguments two into np .py.

02:27 So here i am using the pi value np .pi which is defined in numpy.

02:32 This is 3 .14 comma 1000.

02:35 So three arguments in a line space i am sending.

02:38 So this is the value for the t calculation and after this x and y which are the radius in the x and y for eclipse.

02:48 Suppose this is the eclipse here and for x component is the this one in a horizontal and y component in a vertical way.

02:59 So here x component is varying according to sine and y component is varying according to the cos.

03:05 So here in the numpy i am using sine and cos function which are defined in the numpy.

03:12 So here x equal to a into np .sin t.

03:15 So here sine value will be calculated and y equal to b into np .cos t.

03:21 So y value will be calculated.

03:23 After this we have to do the plotting work.

03:26 So plotting will be done by the matplotlib libraries.

03:29 So here plt .plot this will plot the graph by taking the two argument x and y.

03:36 Now i have now i am defining the another function that is plot underscore components because we have to plot the components and it is using the two arguments a and b.

03:48 The radius in the x direction and the radius in the y direction.

03:51 So here i am using the comment here i have written something in the comment.

03:55 Plot the x and the y component of an eclipse with the radius in the x direction and the radius in the radius b in the y direction.

04:03 Arguments a the radius in the x direction b the radius in the y direction.

04:08 So this is the comment here...

SOLVED: Please code in MATLAB, and do not use any sort of functions to generate circles or lines, or to compute Hough transforms.

To start off with, let's generate some fake edge data so that we know what the solution is.

Create a 400x400 binary image t (2024)
Top Articles
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated:

Views: 5652

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.