Given y1, y2, and y3 as a function of x. In the same graph plot the three functions for x ?[-3,3] . Follow the form given below.
function y1 Line style: solid, color: blue function
y2 Line style: dashed, color: black function
y3 Line style: dotted, color: red
Label the x and y axis; x axis as (x), and the y axis as (y1,y2,y3), title the graph as (problem5), add a legend on the plot.
y1=x^4-e^(-x)
y2=x^2-x^3+25
y3=30-12x,
PLEASE REFER BELOW CODE
close all
clear all
clc
%Generate x array with increment 0.1
x = -3:0.1:3;
%Given expression and substitute x in that
y1 = x.^4 - exp(-x);
y2 = x.^2 - x.^3 + 25;
y3 = 30 - 12 * x;
%plot y1 y2 and y3 with given specification
plot(x,y1,'b-');
hold on
plot(x,y2,'k--');
plot(x,y3,'r:');
hold off
xlabel('x'); %X-axis label
ylabel('y1 y2 y3'); %Y-axis label
title('problem5'); %title for graph
legend('y1','y2','y3'); %Legend for plot
PLEASE REFER BELOW PLOT
Given y1, y2, and y3 as a function of x. In the same graph plot the...
(10 pts) Write a single .py file program to plot the following functions on the same graph for x values from –π to π : y1 = cos(x) y2 = cos(2x) y3 = cos(3x) Plot specifications: Choose an appropriate increment to generate smooth curves and add a comment in the code as to the rationale for that increment to receive full credit y1 is red and dashed y2 is blue and solid y3 is black and dotted Add a legend...
1. Dressing up the graph with text, gtext, xlabel, ylabel, and tit le: Plot y = exp(r) in the interval [-3, 3] using a solid line. Now plot a linear approximation of e (i.e., y = x) using a dashed line and a 1 + r + using a dotted line. Title the plot "Gross Approximations of exp(x)." Label the y-axis as text to label the exp(a) quadratic approximations of exp(r) appropriately. Set axes limits to [-3, 3, -5, 15)....
two functions. The first plot on the left is y = 1 − e(−0.5sqrt(x) and the second plot on the right is y = e(−0.5sqrt(x) . Let x be from 0 to 10 with increment 0.1. The first plot is in blue color, solid line and the second is in red color, dotted line. Turn both grids on. Both figures should have own title and x-axis and “y-axis” labels. Note that you should plot both according to the above instruction....
2. [x] Suppose that Y1, Y2, Y3 denote a random sample from an exponential distribution whose pdf and cdf are given by f(y) = (1/0)e¬y/® and F(y) =1 – e-y/0, 0 > 0. It is also known that E[Y;] = 0. ', y > 0, respectively, with some unknown (a) Let X = min{Y1,Y2, Y3}. Show that X has pdf given by f(æ) = (3/0)e-3y/º. Start by thinking about 1- F(x) = Pr(min{Y1,Y2, Y3} > x) = Pr(Y1 > x,...
Practice: Plot x vs y when y sin(x), y cosx), y sin (2"x), and y-2 sin(x) when x-1:0.1:10. Use 2 by 2 subplot, sin(x) is in location 1, cos(x) is in location 2, sin(2x) is in location 3 and 2 sin(x) is in location 4 The plot should have: (1) x labe|-"х value", y label = 'y value', legend 'y=sin(x)',' y-cos(x)',' y-sin (2*x)', "y-y-2*sin(x), and title = "X Vs. y, under Font Name of Times New Roman, and Font Size...
Using MatLab what would be the script for problem 4 given that question4.xlsx is the chart in the second picture. I know how to upload it and find the length but when I try to do the graph no graph is showing up after I run the script. 4. The excel file attached to this homework titled "question4.xlsx" contains data from a certain experiment. Column 1 shows the experimental value and column 2 shows the expected value. a. Open this...
y21.6y + 1.2yz + 4.8 ed 8. (30 pts.) Take home the following problem, solve it and hand it out till May 8. Write the ODE y -4y' y3 0 as a system, solve it for y2 as a function of y1 and graph some of the trajectories in the phase plane. (refer page 186 of the textbook) y21.6y + 1.2yz + 4.8 ed 8. (30 pts.) Take home the following problem, solve it and hand it out till May...
Plot the following: For x between -4pi to +4pi f(x)-x"sin(x-1) Use a blue dotted line type with asterisk markers. Add a title for the x axis as 'x'and 'x squared sine of 1 over x' for the y axis.
In this exercise, you will create a function trough_plot which will plot the cross-section of a trough outlines by the functions y0 and y. Input variables: x – a vector representing the x co-ordinates for the outline of the trough. y – a vector representing the y co-ordinates for the bottom of the trough. y0 – a vector representing the y co-ordinates for the top of the trough. Output variable: n/a – this function has no output variables. Process: The...
Please MATLAB for all coding with good commenting. (20) Consider the function f(x) = e* - 3x. Using only and exactly the four points on the graph off with x-coordinates -1,0, 1 and 2, use MATLAB's polyfit function to determine a 3' degree polynomial that approximates f on the interval (-1, 2]. Plot the function f(x) and the 360 degree polynomial you have determined on the same set of axes. f must be blue and have a dashed line style,...