Reading a table

Engineering data arrives as a table: a property against a temperature, a section against a depth, a measured curve against a load. linterp reads a value out of one, interpolating linearly between the rows either side.

It carries units, which is worth saying because SMath's does not — its linterp reduces every entry to a bare number and hands one back, so worksheets that use it divide the units out by hand and multiply them back in. That form still works here; it is simply no longer necessary.

Yield strength of a steel against temperature

Four rows from a material datasheet. The temperatures are absolute, because an interpolation is a weighted sum and a weighted sum of readings on an offset scale means nothing — °C is refused here for the same reason it cannot be scaled.

T=[293373473573]⁢K
Fy=[250235205170]⁢MPa

The design condition sits between two rows.

Tdesign=423⁢K
Fydesign=linterp⁡(T,Fy,Tdesign)=linterp⁡([293 K, 373 K, 473 K, 573 K],[250000000 Pa, 235000000 Pa, 205000000 Pa, 170000000 Pa],423⁢K)=220000000⁢Pa
Fydesign=220⁢MPa

And the check that goes with it

σ=180⁢MPa
checkσ≤Fydesign=180⁢MPa≤220000000⁢Papass

The table is read, not extrapolated

linterp refuses a point outside the rows it was given rather than continuing the last segment's slope. A table asked for a condition it never covered is where a confident wrong number does the most harm, and SMath answers that one silently.

Tbeyond=800⁢K

linterp(T, Fy, T_beyond) would be refused: 800 K is off the end of the table.

A measured curve

Deflection measured against load, and the load that produced 1 mm of it read back the other way round — the same function, with the columns exchanged.

P=[05101520]⁢kN
δ=[00.420.861.351.9]⁢mm
δat_12=linterp⁡(P,δ,12⁢kN)=linterp⁡([0 N, 5000 N, 10000 N, 15000 N, 20000 N],[0 m, 0.00042 m, 0.00086 m, 0.00135 m, 0.0019 m],12⁢kN)=0.001056⁢m
Pat_1mm=linterp⁡(δ,P,1⁢mm)=linterp⁡([0 m, 0.00042 m, 0.00086 m, 0.00135 m, 0.0019 m],[0 N, 5000 N, 10000 N, 15000 N, 20000 N],1⁢mm)=11428.6⁢N
δat_12=1.056⁢mm
Pat_1mm=11.4286⁢kN