MATLAB CODE
clc
clear all
x=-5;
i=1;
while x<=30
if x<0
y(i)=10;
elseif x>=0 && x<9
y(i)=10*x+10;
elseif x>=9
y(i)=15*sqrt(4*x)+10;
end
i=i+1;
x=x+.5;
end
x=-5:.5:30;
plot(x,y)
xlabel('x')
ylabel('y')
grid on
OUTPUT
1) (2 pts) Write a script to plot the function 15V4r +10 r29 10 r<0 for-5ss...
Write as a shell script Write as a shell script # include <stdio.h> int main (void) {int area_code, prefix, number; printf("Enter phone number [(999) 999-9999]:"); scanf("(%d)%d-%d", &area_code, & prefix, & number); printf("You entered %d-%d-%d \n", area_code, prefix, number); return 0;}
4. [10 pts] Let X be a random variable with probability density function if 1 < a < 2, 2 f(a)a 0 otherwise. Find E(log X). Note: Throughout this course, log = loge.
3i)16 in polar form: z r(cos 0isin 0) where (1 Write the complex number z and e= The angle should satisfy 0 0 < 2«.
(4) Find the Laplace transform of this function: Set if 0 <t <2, 0 if 2 <t.
(6 pts) Consider the joint density function f(x, y) = { (9- 2- y), 0<r<3, 3 Sy <6, 0, otherwise Find P(0 < < <1,4 <y<6).
2. (8 pts) In contrast to the Heine-Borel Theorem in R", show that the closed unit ball in f = {(21,..., In, ...): -10 < } is not compact. (Hint: find a sequence on the unit sphere containing no convergent subsequence)
With the help of the Fourier series y" + y = r(x) = 2 (0<=<1) 2-2 (1<x<2) r(x+2) = r(2) Find the general solution of the differential equation
Question 25 2 pts Let C be the path from (0,0) to (1, 0) to (1,2). The work done by the force F =< 0,5 > on C is O 10 00 05 O 15
Let S function, f: S R, between the two sets. x < 1}. Show that S and R have the same cardinality by constructing a bijective x E R 0
Please solve using MATLAB. Write a MATLAB function to compute and plot the output of the discrete-time system for x[n]-u[n], 0 < n < 1000. Based on these results can you make a statement regarding the stability of the system? Hint: Check the value y[600]