Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.7 Suppose that x=2 and y=1. Evaluate the following expressions using MATLAB. (a) 42x3 tb) 42y3 Note that MATLAB evaluates expressions with complex or imaginary

image text in transcribed
image text in transcribed
1.7 Suppose that x=2 and y=1. Evaluate the following expressions using MATLAB. (a) 42x3 tb) 42y3 Note that MATLAB evaluates expressions with complex or imaginary answers transparently. I.8 The equation of an ellipse centered at the origin is a2x2+y2y2=1 where a and b are distanzes from the center along the x and y axes, respectively. The area of this ellipse can be calculated from the equation A=mab Use MATI_AB as a calculator to calzulate the area of an ellipse with a=5 and b=10 Figure 1.15 An ellipse centered at the origin (0.0). 1.9 The circumference (perimeter) of as ellipse like the one defined in Figure 1.15 can be approximated by calculating an intermediate parameker h : h=(a+b)2(ab)2 The approsimate circumference cas be found from a,b, ard h as: C=a(a+b)(1+10+43h3h) Create a script file that defines a and b, calcu ates h, and then calculates the final circurnference. Asume that a and b are the same values as in the previous exercise. 1.10 Modify the script file cirele_and_mphere . m created in Section 1.5.2 by removing the line r=5, and ava the seript alle with a asw name. Atter this change, the script will conly work if I is predefiaed in the Workspace before the seript is exacuted. If x is set to a different value before the script is executed, then the calculations will be performed for a differert radius. Take advantage of this fact to calculate the four circle and sphere paramsters for radii of 1,5,10, and 20. I.II Type the folowing MATL AB staterents into the Command Window: 4=5a=arep1b=ara/piand What are the results in a,b, and ans? What is the final value saved in ans? Why was that value retained during the subsequent calculazions? I.I2 Use the MATLAB Help Browser to find the command required te show MATLAB's current directory. What is the curtent directory when MATL.AB starts up? 1.7 Suppose that x=2 and y=1. Evaluate the following expressions using MATLAB. (a) 42x3 tb) 42y3 Note that MATLAB evaluates expressions with complex or imaginary answers transparently. I.8 The equation of an ellipse centered at the origin is a2x2+y2y2=1 where a and b are distanzes from the center along the x and y axes, respectively. The area of this ellipse can be calculated from the equation A=mab Use MATI_AB as a calculator to calzulate the area of an ellipse with a=5 and b=10 Figure 1.15 An ellipse centered at the origin (0.0). 1.9 The circumference (perimeter) of as ellipse like the one defined in Figure 1.15 can be approximated by calculating an intermediate parameker h : h=(a+b)2(ab)2 The approsimate circumference cas be found from a,b, ard h as: C=a(a+b)(1+10+43h3h) Create a script file that defines a and b, calcu ates h, and then calculates the final circurnference. Asume that a and b are the same values as in the previous exercise. 1.10 Modify the script file cirele_and_mphere . m created in Section 1.5.2 by removing the line r=5, and ava the seript alle with a asw name. Atter this change, the script will conly work if I is predefiaed in the Workspace before the seript is exacuted. If x is set to a different value before the script is executed, then the calculations will be performed for a differert radius. Take advantage of this fact to calculate the four circle and sphere paramsters for radii of 1,5,10, and 20. I.II Type the folowing MATL AB staterents into the Command Window: 4=5a=arep1b=ara/piand What are the results in a,b, and ans? What is the final value saved in ans? Why was that value retained during the subsequent calculazions? I.I2 Use the MATLAB Help Browser to find the command required te show MATLAB's current directory. What is the curtent directory when MATL.AB starts up

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions