Code for Curve Fitting - Linear and Cubic
Objective: Code for Curve Fitting - Linear and Cubic clear all close all clc % Data Preparation cp_data = load(\'data_hw\'); temp = cp_data(:,1); cp = cp_data(:,2); % Curve fit co_eff_linear = polyfit(temp,cp,1); co_eff_cubic = polyfit(temp,cp,3); predicted_cp_linear = polyval(co_eff_linear,temp); predicted_cp_cubic = polyval(co_eff_cubic,temp);…