How can I write and solve this equation? as a function??
20 views (last 30 days)
Star Strider on 10 Feb 2022
Possibly, after first providing values for the constants:
T(z,z0,Tz0,Tinf) = Tinf - (Tinf - Tz0).*exp(z-z0); % Function
zsol = fzero(@(z)T(z,z0,Tz0,Tinf), rand) % Correct Call To It (Here Using 'fzero', Can Be Any Function)
See the documentation on Anonymous Functions for details.