Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) Filename: MAE1090 HW8 1.m Write an m-file to evaluate the following function of two variables z e l 5 (x) e 5 cos Cy)
1) Filename: MAE1090 HW8 1.m Write an m-file to evaluate the following function of two variables z e l 5 (x) e 5 cos Cy) over the range of 10 S x S 10 and 10 S y S 10 Use a step size of 0.4 in both the x and y directions. Generate the matrix of z values in two different ways: 1. Use a nested for loop to evaluate z at all possible (x,y) combinations over the given range. 2. Use meshgrid.m to generatex and y matrices, with which you can calculate the matrix z with a single MATLAB command. Plot the resulting z matrices as surface plots with contour lines, as shown below. Plot the z matrix generated using a nested for loop to figure 1 and the z matrix generated as the result of a matrix function to figure 2. They should, of course, be identical, as long as you index the nested for loop correctly. Add title and axis labels as shown below. Use a bold font for the title. Set the viewing angles to AZ 40 and EL- 30 Your plots should both look exactly as shown below
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started