Menu

Write Matlab Tq Given Question Info Provided Q43793364

2. (a) The temperature of a printed circuit board is measured every minute after switching it off to see how quickly the heat

how to write this in MATLAB? TQ

This is all that has been given in this question. No more infocan be provided.

2. (a) The temperature of a printed circuit board is measured every minute after switching it off to see how quickly the heat dissipates. The temperature measurements are stored in a row vector called temp and the respective times are stored in a row vector called time. (1) The 120 data point was entered incorrectly and should have been 44 °C. Write down the command that corrects this value in temp (ii) Add two further data points to the variables for the following two additional measurements: Time (mins) Temp (°C) 4521 60 20 (b) The temperature decay should have the following theoretical behaviour T(t) = Ta + (T. -T.)e-it where (c) is the temperature at time t, T, is the ambient temperature, T, is the initial temperature, and k is a constant. (1) Write a function called func that calculates a set of expected temperatures from the following input arguments: Ta, TO, k and a time vector, t. (11) Write down the command that would call this function using the vector time as one input argument along with the following values of the other input arguments: Ta 20 °C TO 100 °C k 0.2 min (c) (0) Write a script that will call the function several times for 6 different values of k between 0 and 0.5 whilst keeping the same values of Ta and TO as shown above. For each value of k, calculate the sum of the squares of the differences between each fitted data point Ti and each measurement, TE (T-1)2 and store the value in a vector, SumSquares. (ii) Write a script to find the value of k that minimises the vector SumSquares as this represents the value that best fits the data. Show transcribed image text 2. (a) The temperature of a printed circuit board is measured every minute after switching it off to see how quickly the heat dissipates. The temperature measurements are stored in a row vector called temp and the respective times are stored in a row vector called time. (1) The 120 data point was entered incorrectly and should have been 44 °C. Write down the command that corrects this value in temp (ii) Add two further data points to the variables for the following two additional measurements: Time (mins) Temp (°C) 4521 60 20 (b) The temperature decay should have the following theoretical behaviour T(t) = Ta + (T. -T.)e-it where (c) is the temperature at time t, T, is the ambient temperature, T, is the initial temperature, and k is a constant. (1) Write a function called func that calculates a set of expected temperatures from the following input arguments: Ta, TO, k and a time vector, t. (11) Write down the command that would call this function using the vector time as one input argument along with the following values of the other input arguments: Ta 20 °C TO 100 °C k 0.2 min (c) (0) Write a script that will call the function several times for 6 different values of k between 0 and 0.5 whilst keeping the same values of Ta and TO as shown above. For each value of k, calculate the sum of the squares of the differences between each fitted data point Ti and each measurement, TE (T-1)2 and store the value in a vector, SumSquares. (ii) Write a script to find the value of k that minimises the vector SumSquares as this represents the value that best fits the data.

Expert Answer


Answer to how to write this in MATLAB? TQ This is all that has been given in this question. No more info can be provided….

OR