Write a local function called cosLineWidths that will plot cos (x) for x values ranging from...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a local function called cosLineWidths that will plot cos (x) for x values ranging from - pi to pi in steps of 0.1, using black *'s. It will do this three times across in one Figure Window, with varying line widths (Note: even if individual points are plotted rather than a solid line, the line width property will change the size of these points.). If no arguments are passed to the function, the line widths will be 1, 2, and 3. If, on the other hand, an argument is passed to the function, it is a multiplier for these values (e.g., if 3 is passed, the line widths will be 3, 6, and 9). The line widths will be printed in the titles on the plots. Test your function with: cosLineWidths Line Width 1.00 Line Width 2.00 Line Width 3.00 1 1 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 -0.2 -0.2 -0.2 -0.4 -0.4 -0.4 -0.6 -0.6 -0.6 -0.8 -0.8 -0.8 -1 -4 -1 -4 -2 2 -4 -2 0. 4. -2 2 4 X cosLineWidths (0.5) Line Width 0.50 Line Width 1.00 Line Width 1.50 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 -0.2 -0.2 -0.2 -0.4 -0.4 -0.4 -0.6 -0.6 -0.6 -0.8 -0.8 -0.8 -1 -4 -1 -4 -2 4 -2 2 4 -4 -2 2 X X (x)soɔ (x)soɔ (x)soɔ (x)soɔ (x)soɔ cos(x) Write a local function called cosLineWidths that will plot cos (x) for x values ranging from - pi to pi in steps of 0.1, using black *'s. It will do this three times across in one Figure Window, with varying line widths (Note: even if individual points are plotted rather than a solid line, the line width property will change the size of these points.). If no arguments are passed to the function, the line widths will be 1, 2, and 3. If, on the other hand, an argument is passed to the function, it is a multiplier for these values (e.g., if 3 is passed, the line widths will be 3, 6, and 9). The line widths will be printed in the titles on the plots. Test your function with: cosLineWidths Line Width 1.00 Line Width 2.00 Line Width 3.00 1 1 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 -0.2 -0.2 -0.2 -0.4 -0.4 -0.4 -0.6 -0.6 -0.6 -0.8 -0.8 -0.8 -1 -4 -1 -4 -2 2 -4 -2 0. 4. -2 2 4 X cosLineWidths (0.5) Line Width 0.50 Line Width 1.00 Line Width 1.50 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 -0.2 -0.2 -0.2 -0.4 -0.4 -0.4 -0.6 -0.6 -0.6 -0.8 -0.8 -0.8 -1 -4 -1 -4 -2 4 -2 2 4 -4 -2 2 X X (x)soɔ (x)soɔ (x)soɔ (x)soɔ (x)soɔ cos(x)
Expert Answer:
Related Book For
Discovering Advanced Algebra An Investigative Approach
ISBN: 978-1559539845
1st edition
Authors: Jerald Murdock, Ellen Kamischke, Eric Kamischke
Posted Date:
Students also viewed these programming questions
-
Consider the diode bridge rectifier shown below with the voltage regulating capacitor in parallel with the load resistor. 60Hz 120V 10:1 C-470F IL R=1kQ a) For the input signal, sketch waveforms of...
-
In Figure particles 1 and 2 are fixed in place on an x axis, at a separation of L = 8.00cm. Their charges are q1 = + e and q2 = ?? 27e.Particle 3 with charge q3 = + 4e is to be placed on the line...
-
Write a user-defined function that plots an ellipse with axes that are parallel to the x and y axes, given the coordinates of its center and the length of the axes. For the function name and...
-
Suppose that 1 8 E1 1 E2 1 4 and E, E A = I. Express A as a product of elementary matrices. 1 1 -8 8 () A 1 -8 (A) A (C) A = 4 1 -4 -4 1 1 (D) A = 1 1 1 1 -8 1 1 1 -8 (E) A = 4 (F) A (G) A 4 4 1 1 1...
-
a. Verify, algebraically, that formula (3.2) for calculating r is equivalent to the definition formula (3.1). b. Verify, algebraically, that formula (3.6) is equivalent to formula (3.5).
-
An air conditioner draws 12 A at 220-V ac. The connecting cord is copper wire with a diameter of 1.628mm. (a) How much power does the air conditioner draw? (b) If the total length of wire is 15m, how...
-
For each of the following residual plots, determine whether the assumptions of the linear model are satisfied. If they are not, specify which assumptions are violated. b. C. d.
-
Home Town Supply does not segregate sales and sales taxes at the time of sale. The register total for March 16 is $10,388. All sales are subject to a 6% sales tax. Compute sales taxes payable and...
-
The internal audit department discovered the following items: 1. Goods valued at $42,000 held on consignment from Dix Company were included in the physical count but not recorded as a purchase. 2....
-
To: [Your name] From: Supervising Attorney Re: Commonwealth v. Clavel; execution of search warrantunannounced entry We represent Darren Clavel in the case of Commonwealth v. Clavel. In this case,...
-
If the value of the total angular momentum J=3/2. Find the matrix of a) Jx b) Jy c) [ Jx,Jy ]
-
PEM, Incorporated, is experiencing financial difficulty due to erratic sales of its only product, a high-capacity battery for laptop computers. The company's contribution format income statement for...
-
Assignment 1 requires you to calculate joint probabilities and to develop a decision tree based on the hypothetical stock prices for the major US banks provided in the dataset provided for this...
-
Larned Corporation recorded the following transactions for the just completed month. a. Purchased $80,000 of raw materials on account. b. $71,000 in raw materials were used in production. Of this...
-
Sheffield manufactures a fine wine in two departments, Fermenting and Bottling. In the Fermenting Department, grapes are aged in casks for a period of 30 days. In the Bottling Department, the wine is...
-
A house in Finland has 280 m2 of walls constructed of panels of the type shown in Figure 1. The wood is pine and the insulation has thermal conductivity kins = 0.07 W/m.K. A central heating system...
-
Assuming annual compounding, what is the forward rate between years 1 and 3 given the following spot rates? Maturity (years) 1 2 3 4 Spot rate (%) 2.9 3.2 3.6 4.2
-
DC has unused FTC carryover from 2017 in the separate category for GC income as the result of income generated by a foreign branch. The income was foreign source general category income. In 2018 the...
-
Write an equation for each graph. a. b. c. d. 24
-
The half-life of radium-226 is 1620 yr. a. Write a function that relates the amount s of a sample of radium-226 remaining after t years. b. After 1000 yr, how much of a 500 g sample of radium-226...
-
What is the slope of the line that passes through the point (4, 7) and is parallel to the line y = 12(x - 5) + 21?
-
Find the force transmitted to the base of a viscously damped system subjected to a harmonic force, in the steady state, by using the relation \(f_{T}=F_{0} \cos \omega t-m \ddot{x}\) instead of...
-
A single-story building frame is subjected to a harmonic ground acceleration, as shown in Fig. 3.57. Find the steady-state motion of the floor (mass \(m\) ). Figure 3.57:- 22 -x(t) m (!) - A cos cot...
-
Find the horizontal displacement of the floor (mass \(m\) ) of the building frame shown in Fig. 3.57 when the ground acceleration is given by \(\ddot{x}_{g}=100 \sin \omega t \mathrm{~mm} /...
Study smarter with the SolutionInn App