Write a local function called cosLineWidths that will plot cos (x) for x values ranging from - pi to pi in steps of 0.1,
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)
Step by Step Solution
3.31 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
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