All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
In this project, I have shown graph value of the polynomial curve-fitting by 1-3 degree . Greater the degree of the polynomial, better will be the fit, however, with higher orders, shows error. Calculating the RMS value between the estimated and the original plot gives a rough idea of the best-suited curve within a particular…
Aravind Subramanian
updated on 23 Oct 2019
In this project, I have shown graph value of the polynomial curve-fitting by 1-3 degree . Greater the degree of the polynomial, better will be the fit, however, with higher orders, shows error. Calculating the RMS value between the estimated and the original plot gives a rough idea of the best-suited curve within a particular error range.
In this code, I have plotted a graph between the degree of a polynomial and the RMS value for each polynomial. I found that higher the order of the polynomial, lower is the RMS ERROR and and values which lies within the range of 0.5 are shown which depicts the accuracy of polynomial with increase in degree
%Preparing the data
cp_data=load(\'data\');
temp=cp_data(:,1);
cp=cp_data(:,2);
j=1;
while j<4 %find upto polynomial of 3
% curve fit
coeff=polyfit(temp,cp,(j));
predicated_cp = polyval(coeff,temp);
%compare curve fit with original data
figure(j)
plot(temp,cp,\'linewidth\',3)
xlabel(\'temperature[k]\');
ylabel(\'specific heat[KJ/Kmol-k]\');
hold on
plot (temp,predicated_cp,\'linewidth\',3)
legend(\'original data set \', \'predicated data set\');
pause(0.5)
%Root Mean Square Error Calculation
Error(j) = sqrt((sum(abs(predicated_cp - cp).^2))); %stores the root mean sqaure error of each degree polynomial in Error matrix
fprintf(\'RMS value is %d\',Error(j));
figure(4)
plot(Error,\'-ko\') % plots the curve as well as highlights the points
grid on %turns grid on
xlabel(\'Degree of Polynomial\')
ylabel(\'RMS Error\')
while i<3200
if(abs(cp(i,1)-predicated_cp(i,1))<0.5)
c=c+1;
end
i=i+1;
end
fprintf(\'no of values lies within diff of 0.5 is %d out of %d\',c,i);
j=j+1;
end
polynomial of degree 1
polynomial of degree 2
polynomial of degree 3
3
RMS graph
Results to show accuracy of polynomial with increase in degree
RMS value is 1.470731e+03
no of values lies within diff of 0.5 is 43 out of 3200
RMS value is 7.349201e+02
no of values lies within diff of 0.5 is 69 out of 3200
RMS value is 3.070375e+02
no of values lies within diff of 0.5 is 143 out of 3200>>
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week 11 - Louver/Grille characterization
Aim The objective of the project is to simulate a hexa grille placed at the center of the channel for a streamline flow and do a parametric optiization of the design. Task Define a parameter to optimize the design. Define trials. Define primary and compound functions that you want to report. Calculate parametric solutions.…
20 Sep 2021 12:41 PM IST
Week 12 - Final Project - Modelling and Analysis of a Datacenter
AIM The objective of the project is to create a data center model using macros in the Icepak. The main parts of the data center are Computer room air conditioning (CRAC), server cabinets, power distribution units and perforated tiles. Analyze the flow distribution and behaviour of temperature in the server stacks. Problem…
20 Sep 2021 12:41 PM IST
Week 10 - MRF project
Aim The objective of the project is to create a MRF model by importing the model to Ansys Icepak and setup the physics & solve the thermal model. Moving Reference Frame The Moving reference frame approach is a steady state method used in CFD to model problems with rotating parts. The MRF is a moving/sliding mesh…
24 Aug 2021 05:23 PM IST
Week 9 - PCB Thermal Simulation
PCB Board A printed circuit board (PCB) mechanically supports and electrically connects electronic components using conductive tracks, pads and other features etched from one or more sheet layers of copper laminated onto and/or between sheet layers of a non conductive substrate. Components are generally…
19 Jul 2021 11:56 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.