Please solve using MATLAB. Will rate
The MATLAB code for plotting both curves is given below. It contains the usage of another functioned that is used to calcuate the Right Riemann Sum which is to be defined in another file named rsum_1.m . The corresponding code is given further below. The resulting plot is attached.
fun=@(x)exp(-x.^2/2); %function defined in terms of variable
x
k=1;
f=zeros(1,21);
g=zeros(1,21);
for z=0:0.25:5 %step-size taken as 0.25 to plot enough number of
points
f(k)=integral(fun,0,z)/sqrt(2*pi); %gaussian distribution evaluated
using 'integral'
g(k)=rsum1(fun,0,z,20)/sqrt(2*pi); %gaussian distribution evaluated
using Right Riemann Sum
k=k+1;
end
xaxis=linspace(0,5,21); %generate 21 equally spaced points between
0 and 5
plot(xaxis,f) % plot the gaussian curve(integral) against this
vector
hold on; % hold on to plot another curve
plot(xaxis,g) % plot gaussian curve (riemann sum) against this
vector
xlabel('z'); %define labels of the axes
ylabel('f(z)');
rsum_1.m
function value=rsum_1(Fun,a,b,number)
%a and b are the lower and upper limits of function to be
approximated reepectively
%number is step-size of approxiamting the integral(number of
rectangles)
delx=(b-a)/number; %width of the rectangle
Rsum=0;
for j=1:number
Rsum=Rsum+vpa(feval(Fun,a+(j)*delx))*delx; %evaluates the function
at right-end point (a+dx,a+2dx,a+3dx...) %and adds it to
resuls
end
value=Rsum;
end
The blue curve corresponds to the function evaluated using integral and the red curve belongs to the function evaluated using Right Riemann Sum.
Please solve using MATLAB. Will rate Problem 4; Applications of functions in numerical computations The probability...
please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks.please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me...
please do this problem in matlab and show me the code. Thanks. please do this problem in Matlab and show me the code. Thanks. Problem #1: Circuits and linear-systems In the last HW you developed the governing equations for the “Wheatstone”-bridge circuit used extensively in engineering applications (shown below). B R R2 A D G m RA с E The resulting equations were solved for the output voltage and currents using the function: function [V_out, I_vector] =Wheatstone_bridge (v_in, R_vector) In...
Numerical Methods for Engineers and Scientists 3rd Edition – An Introduction with Applications Using MATLAB - Gilat | Subramaniam Problem 3.29 A quarterback throws a pass to his wide receiver running a route. The quarterback releases the ball at a height of hQ . The wide receiver is supposed to catch theball straight down the field 60 ft away at a height of h R . The equation that describes the motion of the football is the familiar equation of...
Using MATLAB, please solve questions 5 and 6. 5. Basic integration TV2 Show that tan 1 = (sin? x dx = SV1- x? dx. 0 6. Integration with simple probability application The results x of a certain biological test are found to be normally distributed, with an average value u of 800 and a standard deviation o of 100. We can define zo = (x – u)/o as a measure of the number of standard deviations from the mean that...
matlab The error function is a mathematical function that frequently arises in probability and statistics. It also can show up in the solution to some partial differential equations, particularly those arising in heat and mass transfer applications. The error function is defined as 2 e-t dt picture attached This function is actually built-in to MATLAB as the command erf, and here we'll use that function to compute a "true value" with which we can compare results of two interpolation approaches....
Please solve these using matlab Problem 1 Given the transfer functions e S +5 (a) C(s) 20 S + 20 (b) Use the step function to determine the time constant and rise time for each system. Note: estimate these values from the plot and do not use the stepinfo function. Problem 2 Given the transfer function 100 G(S) = 22 +45 + 25 a. Use the plot resulting from the step function in MATLAB to determine the percent overshoot, settling...
QUESTION 5 please. 4. MATLAB can solve second order equations numerically, but it needs to convert it to a sys- tem first. We haven't covered systems yet, but we can make use of them (entirely in MAT- LAB) to solve this problem. The help page https://www.mathworks.com/help/symbolic/ solve-differential-equation-numerically-1.html shows how to do this. Follow those steps to get the solution to day +9y = cos(3) dt2 y(0) = 0 v(0) = 0 Plot this and your solution from the previous part...
4. MATLAB can solve second order equations numerically, but it needs to convert it to a sys- tem first. We haven't covered systems yet, but we can make use of them (entirely in MAT- LAB) to solve this problem. The help page https://www.mathworks.com/help/symbolic/ solve-differential-equation-numerically-1.html shows how to do this. Follow those steps to get the solution to day +9y = cos(3) dt2 y(0) = 0 v(0) = 0 Plot this and your solution from the previous part on the same...
Please solve problem 4 and 5 using matlab and include the screenshot of the result , thank you Homework #8 Applied Programming, ENGR 10573 Spring 2018 Due Monday, Apr. 2 uploaded through TCU Online by 11:59 PM. Upload one script or function, named studentlastn ame-homework 8 ) n a single m- file that runs each problem. The homework problems should run sequentially showing I figure and or plots along with the proof that each problem works correctly. The single m-file...