Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

USING MATLAB: Please show how to do this in Matlab a) Create a script file that

ID: 3720703 • Letter: U

Question

USING MATLAB: Please show how to do this in Matlab

a) Create a script file that uses three sets of nested loops to calculate the final temperature of a light bulb filament. The three nested loops are necessary to calculate Tf for all possible combinations of P, A, and Ti for the engineering formula below. The output from the script should be a 1xn vector representing the values of Tf.

You must initialize the output variable so it does not change in size during the looping.

Hints: Use the nth root command to go from Tf4 to Tf . Use an incrementor (counter) variable to index Tf.

Ti= [ -10 5 24 17 39]

Power = P = [30 60 75 100]

Area = A = [2.0 x 10-5 1.5 x 10-5  1.0 x 10-5]

b) Find the minimum values of Tf and the corresponding values for P,A, and Ti

P = 0 A(T-T)

Explanation / Answer

P = [30 60 75 100];
Ti = [-10 5 24 17 39];
A = [2*10^-5 1.5*10^-5 10^-5];
n=1;
for x=1:4
for j=1:5
for z=1:3
a = ( P(x)/((5.6696*10^8)*A(z)) )+Ti(j)^4;
Tf(n) = sqrt(sqrt(a));
n = n+1;
end
end
end
[r,c] = min(Tf);
disp(Tf')
disp('Minimum of Tf:')
disp(r)