Below is a demonstration of the features of the R_squared function
clear; close all; clc;
This function calculates the coefficient of determination (R-Squared) for the (e.g. measurement) data y and the data yf (e.g. a model fit). NaN entries in either inputs are ignored.
lineWidth=3; markerSize=50; fontSize=25;
R_sq = 0.9885
cFigure; hold on; title(['R^2=',sprintf('%.4f',R_sq)],'Interpreter','Tex'); plot(t,y,'k.','MarkerSize',markerSize); plot(t,yf,'g-','LineWidth',lineWidth); set(gca,'FontSize',fontSize); axis tight; axis square; box on; grid on; drawnow;
Kevin Mattheus Moerman, email@example.com
GIBBON footer text
GIBBON: The Geometry and Image-based Bioengineering add-On. A toolbox for image segmentation, image-based modeling, meshing, and finite element analysis.
Copyright (C) 2019 Kevin Mattheus Moerman
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.