Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to write this in MATLAB? TQ This is all that has been given in this question. No more info can be provided. 2. (a)

image text in transcribed

how to write this in MATLAB? TQ

This is all that has been given in this question. No more info can 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions