Last active
April 8, 2021 18:01
-
-
Save MichaelTr7/12ba1c4d10afe42a228537c603855563 to your computer and use it in GitHub Desktop.
A MATLAB script for curve fitting a plot of data-points.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%Curve Fitting and Publishing MATLAB Code as a PDF% | |
Random_Data_Y = [0 0.141 0.205 0.271 0.371 0.437 0.444]; | |
Random_Data_X = [2.42 104 112 119 126 131 131]; | |
%Preparing data to be curved fitted% | |
[Random_Data_X, Random_Data_Y] = prepareCurveData(Random_Data_X, Random_Data_Y); | |
%Applying type of curve fitting% | |
f = fit(Random_Data_X, Random_Data_Y,'smoothingspline'); | |
%f will now act as a parameter to suggest plot type% | |
plot(f,Random_Data_X, Random_Data_Y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output Results