This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Sr=sum((y-a(1)-a(2).*x-a(3).*x.^2-a(4).*x.^3).^2); %or in book ---> Sr=sum((y-Z*a).^2); St=sum((sum(y)/n-y).^2); %Calculates th coefficient of determination r2=1-(Sr/St); fprintf('\nr^2=%4.3f\n\n',r2);...
View Full Document
This note was uploaded on 09/27/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.
- Spring '09