Problem 46726. [Thermodynamics] Polynomial fitting of heat capacity data
An easy way to describe the temperature-dependence of the ideal gas heat capacity is by use of polynomials. Given are a vector of temperatures T (in Kelvin) and a vector if corresponding heat capacities CP for some substance (in J/mol K).
Your function should perform a polynomial fit of degree N and return a function handle to that polynomial.
Example (hydrogen):
T = [300 400 500 600 700 800 900 1000]; % temperature in K
CP = [28.85 29.18 29.26 29.32 29.44 29.62 29.88 30.2]; % heat capacity in J/mol K
FUN = cpFitting(T,CP,2); % polynomial fitting and create function handle
>> FUN(350)
ans =
29.0074
>> FUN(940)
ans =
29.9943
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers12
Suggested Problems
-
Find the peak 3n+1 sequence value
2402 Solvers
-
1223 Solvers
-
Project Euler: Problem 3, Largest prime factor
1349 Solvers
-
Return the first and last characters of a character array
9118 Solvers
-
Relative ratio of "1" in binary number
1283 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!