Right end of the following steel rod is heated at 200 C whereas left end of the rod is at room temperature. To measure the temperature throughout the rod, multiple thermocouples (???? thermocouples) have been installed on it. Left thermocouple reads the temperature, T1 = 25 °C and right thermocouple reads the temperature, T???? = 200 °C. Rest of the installed thermocouples (???? = 2, 3, … , ???? − 1) follow the equation below: T????−1 − 2T???? + T????+1 = 0 Write down the system of equations for assuming a total of 5 thermocouples have been installed (use MS Word’s equation feature or any third-party equation generator). In MATLAB, generate coefficient matrix and constant vector for the system of equations and solve for the temperature. Print coefficient matrix, constant vector, and temperature on command window. Now assume, 20 thermocouples have been installed on the same steel rod to get more accurate temperature distribution. Use for loop to generate coefficient matrix and constant vector and solve for temperature. Print temperature values and plot the temperature distribution considering the length of rod is 2 m with appropriate legend. [20 points]

Respuesta :

Answer:

Explanation:

(a). computing we have that;

clc% helps in clearing screen

clear all% helps in clearing history

close all% helps in closing files if any

N = 5;

T = zeros(N,N);

T(1,1) = 1;

T(end,end) = 1;

for i = 2 : N-1

T(i,i-1:i+1) = [1,-2,1];

end

b = zeros(N,1);

b(1) = 25;

b(end) = 200;

disp('Temperatures are');

Temp = T\b

the matlab image is uploaded  below.

(b). same goes,

clc% helps in clearing screen

clear all% helps in clearing history

close all% helps in closing files if any

N = 20;

T = zeros(N,N);

T(1,1) = 1;

T(end,end) = 1;

for i = 2:N-1

T(i,i-1:i+1) = [1,-2,1];

end

b = zeros(N,1);

b(1) = 25;

b(end) = 200;

disp('Temperatures are');

Temp = T\b

x = linspace(0,2,N);

plot(x,Temp)

the image of the temperature distribution plot and values is shown in the second image below.

cheers, i hope this helps

Ver imagen Preciousorekha1
Ver imagen Preciousorekha1
ACCESS MORE
EDU ACCESS
Universidad de Mexico