Skip to main content

Posts

Showing posts with the label eccentricity

Find eccentricity and area of ellipse using Matlab

Problem Find the area and eccentricity of the ellipse using simple if else and also using functions in Matlab. The relations for eccentricity and area of ellipse are given below: Area of ellipse equation Eccentricity of ellipse formula To know more about ellipse you can see from here: 1) Math is fun 2) What is ellipse - cut-the-knot Solution As we have already seen many basic programs lets make this a little bit difficult about 0.1 star difficulty from other problems. Remember we are now not adding difficulty in the Matlab program but we are adding difficulty in terms of math. We will see more difficult problems in Matlab soon. Stay tuned for difficult problems. In this problems we will ask the user to give the value of a and b. Then we will check if the user has not entered any value of b less than zero. Because length cannot be negative. And similarly we will check if the user has not entered the value of a less than or equal to 0. Because as the given equat...