main.m835 chars19 lines
In this function, t
is an array of temperatures and alloy
is a string indicating the type of alloy. The function first checks the alloy
string to see whether it is 'steel'
or 'aluminum'
, and sets the k_values
array accordingly. It then interpolates the thermal conductivity values at each temperature in t
using the interp1
function, with linear interpolation and extrapolation for values outside the range of k_values
. The resulting k
array has the same size as t
and contains the interpolated thermal conductivity values for the specified alloy at each temperature.
gistlibby LogSnag