A = [0 0.423891532 0.819380304 1.289479809 1.739548357 2.288748183 2.8990623 3.618974647 4.402757506 5.268816221 6.240886445 7.278958674 8.321358342 9.369407383 10.37825178 11.17417756 12.02774088 12.69808163 13.49653247 14.36958724 15.50198578 16.68295148 20.09421834] %% B = [0 0.406558949 0.771247013 1.123943155 1.487752056 1.915016538 2.365427777 2.852526752 3.419995212 3.933726314 4.436914792 4.958793052 5.510476759 5.961517074 6.415268974 6.843890692 7.102927349 7.118216122 7.677116245 8.751585797 9.636923065 10.32502819 12.9488068] %% plot(A, 'green') hold on plot(B, 'blue') hold off %%
You can see the residual error with linear fit to see which dataset is more linear
[~, eA] = polyfit(1:numel(A), A, 1) [~, eB] = polyfit(1:numel(B), B, 1)
Result
>> eA.normr ans = 4.0713 >> eB.normr ans = 2.8868
Vector 'B' is more linear as compared to A.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.