1 Overview Creating detailed plots are extremely useful in many areas of science. Matlab is known for its ability to produce many types of plots. The main goal of this lab is to allow you opportunity...

1 Overview Creating detailed plots are extremely useful in many areas of science. Matlab is known for its ability to produce many types of plots. The main goal of this lab is to allow you opportunity to try some of these Matlab capabilities in producing 2-D and 3-D plots. The learning objective of this lab can be summarized as follows: 1. Creating standard 2-D and 3-D plots, 2. Formatting desired appearance with different line and marker characteristics, and textual information 3. Using the same plots to represent several graphs. Reading and related topics: Chapters 5 and 10 of Amos Gilat’s book, and the sixth set of slides. 2 Lab Tasks and Submission Guideline Use Matlab to solve the following four problems. Save the code you wrote to solve them, together with the result of it in a report. Make sure you include enough comments in your code. Save your report in a .pdf format, and submit it on D2L. One submission per group is sufficient, but make sure to discuss with your lab partner who will be responsible for submitting your work. Your lab must be submitted by Sunday, November 1st, 11:59 pm. Problem 1: Plot the function f(x) = x 2 e −x and its derivative for 0 ≤ x ≤ 10 in one figure. Plot the function with a solid line, and the derivative with a dashed line. Add a legend and label for axes. Problem 2: The shape of the heart shown in the figure below is given by the equation: x 2 +  y − √3 x 2 2 = 1 where the x takes values in the range of -1 to 1. Create the same plot, nothing that the range of x and y should be -1.5 to 1.5 for x-axis, and -1.5 to 2 for y-axis. Hint: Solve for y in terms of x in order to generate your plot. Note that to generate this plot, you need to plot ’two’ sets of y, given that a square root has ± values. CP118, Fall 2020 Lab 4 – Plotting in Matlab 2 Problem 3: Make a polar plot of the function r = ± √ θ for 0 ≤ θ ≤ 5π The plot shown below in the figure is a Fermat’s spiral. Problem 4: Molecules of a gas in a container are moving around at different speeds. Maxwell’s speed distribution law gives the probability distribution P(ν) as a function of temperature and speed: P(ν) = 4π  M 2πRT 3/2 ν 2 e −M ν2/2RT where M is the molar mass of the gas in kg/mol, R = 8.31J/(mol K), is the gas constant, T is the temprature in kelvins, and ν is the molecule’s speed in m/s. Make a 3-D plot of P(ν) as a function of ν for 0 ≤ ν ≤ 1000 m/s and 70 ≤ T ≤ 320K for oxygen (molar mass 0.032 kg/mpl). Have Fun!
Nov 02, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here