The science of thermodynamics makes extensive use of tables when systems such as
ID: 3632746 • Letter: T
Question
The science of thermodynamics makes extensive use of tables when systems such as a power plant are analyzed. Depending on the system of interest you may only need a portion of the table, such as the following:Temp Specific Volume Internal Energy Enthalpy
C M3/kg kJ/kG kJ/kg
100 1.6958 2506.7 2676.2
150 1.9364 2582.8 2776.4
200 2.172 2658.8 2875.3
250 2.406 2733.7 2974.3
300 2.639 2810.4 3074.3
400 3.103 2967.9 3278.2
500 3.565 3131.6 3488.1
Notice the table is spaced at 50 degree intervals at first, an then 100 degree intervals. Assume you have a project that requires you to use this table, an you would prefere not to use a linear interpolation every time you use it.
-- Write a Matlab program to create a table, applying linear interpolation, with temperature spacing 25 degrees.
-- Read data from relevant excel file: engr1371chapter15.xls using xlsread.
-- Write a table (the output from the Matlab program) into an excel file: newtable.xls
Explanation / Answer
you will need to edit the labels in the new xls files. x = xlsread('engr1371chapter15.xls'); y = zeros(length(x)*2-1,4); y(1:2:end,:) = x; for i = 2:2:length(y) for j = 1:4 y(i,j)= 0.5*(y(i-1,j)+y(i+1,j)); end end xlswrite('newtable.xls');
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.