Write a MATLAB program to generate a sinusoidal signal consisting of frequencies 200Hz, 300Hz and 600Hz with sampling frequency of 2 kHz and pass it through a system H(z) which is cascade combination of two LTI systems H1(z) and H2(z) with zero initial condition and prove the output is same even if you change the order of H1(z) and H2(z) in the cascade connection.
For each of the following, write an algorithm and draw a flow chart then write a MATLAB code in separate script:
1. Finding the area of a rectangle and show it as below: The Area of This rectangle = ?
2. Finding sum of the even numbers from 2 to 100,
3. Finding the volume of a cylinder and show it as: The volume of This cylinder = ?
4. Finding the maximum number among three numbers entered by the user.
Examine the following loops and determine the number of times the loop executes and the final value of ires at the termination of the loop.
a) ires = 0;
for index = -12 : 12
ires = ires + 1;
end
b) ires = 0;
for index = 10 : -2 : 1
if index == 6 continue
end
ires = ires + index;
end
c) ires = 2;
while ires <= 100
ires = ires.^2;
end
d) ires = 2;
while ires > 100
ires = ires.^2;
end
Write MATLAB code to show the result card as shown below. Must ask user to enter the
following fields.
1. Student Name. 2. Reg # 3. Subjects
4. Obtained Marks
Automatically Grading are shown as
Obtained Marks>=80
A
Obtained Marks>=70
B
Obtained Marks>=60
c
Obtained Marks<60
D
compute Reimann sum of the function f(x)=e^(-x^2) for n=4 and n=10 by choosing ck at the right end of the point of the interval [0,2]
A security company/Ambulance Service/Fire Service/Police Service wishes to optimally place vehicles in an area such that the response time to any given call within the area is reached within a given time. It also wishes to find the optimal number of security patrol cars to be deployed within the given area. Use a computational geometric approach to develop a code that receives the alarm/homes points, the targeted time to reach the alarm/home and the average speed of cars within the area and identifies where the vehicles can be optimally placed and also determines the number of vehicles required. The alarm/call points (x1, y1), (x2, y2), ..., (xn, yn) are stored in vectors X = [x1, x2, ..., xn], Y = [y1, y2, ..., yn]. Clearly state your assumptions.
Consider the following signal
x(n) = ASin(2πf1n) + BSin(2πf2n) + CSin(2πf3n);
where A = 9, B = 8, C = 9
Also f1 = 250 Hz, f2 = 750 Hz and f3 = 989
Sampling Frequency fs = 4000 Hz
Perform the following operation on signal x(n) in MATLAB by developing a code:
a) Plot the signal x(n) in time domain.
b) Perform the DFT of the signal and plot magnitude values of signal in frequency
domain.
c) Apply a Low-pass FIR filter (Use convolution to apply filter) with 500 Hz cut-off
frequency to filter the signal x(n).
d) Plot the signal x(n) in time and frequency domain after filtration
You are designing a spherical tank, as shown in figure below, to hold water for a sonll village in
a developing country. The volume of liquid it can hold can be compuned as
V=pi*h2*
(3R-h)/3
where V is the volume of water in the tank in m3, b is the height of water in the tank in m, R is
the radius of tank in m. If R is 3m and V is 30 m.
Formulate the equation in terms of height (h), from above generalized equation, representing the
present situation
Use the correct built-in function in MATLAB to determine all possible values of height (h) that
will satisfy the formulated equation i.e. determine all possible roots of the formulated equation.
From those values height (h) which one is the correct and why?
According to a dietician, a person should consume exactly 200 gm of carbohydrates, at least 175
gm of proteins and at most 150 gm of fats in a meal. The dietician also recommends to have as
much amount of vitamins as possible. The three food items that the person eats has 80, 65 and 30
gm of carbohydrates per kilogram of food item. The same food items contain 10, 12, 23 gm of
proteins in each kilogram. Per kilogram of the same food items comprise of 32, 56 and 42 gm of
fats. Vitamins contained in per kilogram of the same food items are 70, 37 and 58 gm.
Determine how much kilogram of each food item the person should consume so as to have
maximum intake of vitamins by using appropriate built-in function present in MATLAB.
In a coal-fired power plant, operating on Carnot Cycle, it is possible to set any value for the
temperature of boiler in which heat is added to water at high temperature (T) and any value for
the temperature of condenser in which heat is rejected from steam at low temperature (TO), from
the following temperature list
T - [500 320 1000 775 385 670 845 1245 410 300 627 514)ⓇK
Being an operator of power plant you have to select T and Te from the above temperature list so
that power plant operates at its highest efficiency
Write a generalized MATLAB program to select two temperature values Th, and Te for above
condition, without using min and max built-in function
Print the maximum efficiency of cycle and the temperatures at which it occurs.