Professional Documents
Culture Documents
CH460 Process Dynamics & Control Sample Exam: Name: - ID
CH460 Process Dynamics & Control Sample Exam: Name: - ID
ID: ______________________________
Name: ___________________________
1.
ID: ______________________________
c) matrix1=[1, 2, 3, 5; 4, 5, 6, 6];
[row, column] = size (matrix1);
for i=1:row
for j=1:column
matrix2(j,i)=matrix1(i,j);
end
end
disp(matrix2);
Name: ___________________________
ID: ______________________________
2.
What are the values of variables number(1), number(2), and number(3) at the end of the
following script? CIRCLE ALL ANSWERS (20 points)
clear all
clc
number(1:3)=6;
for i= 1: 3
for j=1:i
number(i)= number(i) + j;
end
end
Name: ___________________________
ID: ______________________________
3.
The following program contain multiply syntax error circle them all. Note circle a correct syntax
code will lead to deduction of marks. (20 points)
Name: ___________________________
ID: ______________________________
4.
A program is shown below. Your task is to write a new program that perform the same task and
achieve the same results by replacing the for loops with while loops. You can introduce new variables in
the new program if you need them. (20 points)
i_end=5
j_start=5
counter=1;
for i=1:i_end
for j=j_start:-1:1
counter=counter+1;
end
end
Name: ___________________________
ID: ______________________________
5.
A stirred-tank blending system is shown below. In stream 1, assume that the mass flow rate w1
is constant, but mass fraction of A (x1) varies with time. Assume stream 2 consists of pure A (x2 = 1) and
the mass flow rate w2 can be adjusted. The mass fraction of A in the outlet stream is defined as x and
the set point is xsp. (a) Identify the control strategy. (b) Briefly discuss the advantage of this control
strategy. (c) For control purpose, how to determine the sampling time of measured variables. (20
points)
(a)
C
S
(b)