1.)
using for loop:
program:
N1 = 6;
N2 = 36;
A = 0;
for i = N1:N2
A = A+ (1/factorial(N1))^N1*exp(N1);
end
disp(A)
output:
without for loop:
program:
N1 = 6;
N2 = 36;
A =(N2-N1+1)*(1/factorial(N1))^N1*exp(N1);
disp(A)
output:
1b)
program:
N1 = 6;
N2 = 36;
f = @(x)log(N1/12)*(x.^(3*N1)*exp(N2/cos(N1)));
x = -10:0.01:10;
plot(x,f(x));
xlabel("x");
ylabel("y");
title("x vs. f(x)")
grid on;
outputs
Ni = 6, N2 = 36. Write a Matlab program calculating; N2 A= (1/11)N1eN Hi=N1 1b-...
N1=6 N2=56 1c-Write a Matlab program to find quadratic and the parabola that best approximate the data points N1/100 N1/N2 N1*log2(N2) Cos(N1) Sin(N2) Sin(N1/0.112) N1*N2 у -N122 | N2*0.01 N2/exp(N1) | Tanh(N2)| Log10(N1) Cos(N2/134.12) N1/sinh(N2) х 1d- Write a Matlab code to fit an exponential model and a Power model to the given data set. P.S: For 1b, c, d questions, please use plot, subplot comments.
Write a Matlab program calculating A = (1/6626 1b- please use plot, subplot comments FOR THİS EQUATION : f(x) = In ( ) [x3-6256/(00861
Using MATLAB functions, write a program to answer the question 2) [6 pts] Consider the polynomial y x3-8x2 + 19x - 12 a) Create an anonymous function for y and use that for parts (b)-(d) b) Plot the function over the range 0 s x s 5. Use fplot. c) Find all zeros of the function d) Find the minimum point
[1].(20 Write a MATLAB program to design an FIR filter with the ssba (6KH2-12kHz) and draw the frequency response. The sampling rate is 40kHz and the filter order is 10. Hint: b- firl(10, passband), freqz(b, 1, n (Display the horizontal axis in terms of analog frequency.) [2].(25}) In the following system f,800 samples/sec. yln]= 0.5y/n-1+ z{n]+ z{n_1] - c) Ideal D-to-A Cunverter LTI System Ideal A-to-D Converter -1/F T.-1/P (a) Determine the impulse response h nl/ (b) Determine the output...
Can I please get some help with this?? It's matlab. Code 1 1) Define a function as [NE]- nb_elemt24( n1,n2). 2) Define two vectors A and B by randi(10, [1,n1]) and randi(10, [1,n2]), respectively. 3) Using the commend [C1,D1] hist(A, unique(A)) to find four vectors C1, D1 (for A) and C2, D2 (for B), respectively. Here, vector C1 shows how many times each element of A is repeated. And the elements of vector D1 are the same as elements of...
Exercise 11 (2 pts.): When the following Matlab program is run, it produces an error. WHERE in the Matlab program does the error occur (underline the specific line of Matlab code that produces the error), and WHY does it occur? cleariclc A[-1, 0, -2, 3, 4, 61 Exercise 12 (2 pts.): When the following Matlab program is run, it produces an error. WHERE in the Matlab program does the error occur (underline the specific line of Matlab code that produces...
i need Matlab code asap Write a program that evaluates the function f(x) = tan’x + x - 2 between -27 and 27 in steps of 1/10 and plots the results. Create a function handle for your function, and use function feval to evaluate your function at the specified points. 2. Write a program that locates the zeros of the function f(x) = cos éx -0.25 between 0 and 27. Use the function fzero to actually locate the zeros of...
Hi, for the below output the run is: x : 1 | y : 1 x : 0 | y : 2 x : 0 | y : 0 x : 2 | y : 1 x : 1 | y : 8 Also compare your output output should not be wrong, run on "Xcode" to see the about output. Thanks int x = 1, y = -1; void swapplus1(int n1, int n2) { int temp = n1 +...
1.convert the following arithmetic expression into MATLAB and then evaluate it 27*8+84/12-64/8+33-(36-9). 2. write MATLAB commands to solve the following system of equations. 2x+5y-z=3 -6+3y-3z=-5 8x-6y+7z=-1 3. write MATLAB commans for y=sin2(4.12/6) and give its numerical value.
Consider the hypothesis test Ho: N1-N2 = 0 against Hi: 11-42 + 0 samples below: 1 37 38 31 33 33 30 31 29 39 38 30 38 37 30 39 31 35 38 II 32 29 35 32 32 29 30 37 31 34 30 30 30 32 33 34 Variances: 01 = 4.0, 02 = -0.5. Use 0 = 0.05. (a) Test the hypothesis and find the P-value. Find the test statistic. Round your answers to four decimal...