How to extend exponential fitted line to extrapolate values
15 views (last 30 days)
Show older comments
I made the code below to graph results I got doing some viscosity testing. I want to use the results to predict how much water to add to some paint to get to a given viscosity. I need to extend the line of best fit to the around the 70% mark on the x axis. My knowledge of matlab is pretty basic as you can probably tell.
T = readtable('ViscosityResults.xlsx','Range','L2:M14',... #read spreadsheet and select range
'ReadVariableNames',true,'VariableNamingRule','preserve')...#take headings from file and keep them as they are
figure;
x = T{:,1}
y = T{:,2}
f = fit(x,y,'exp1');
plot(f,x,y)
xlim([0,70])
ylim([0,45])
title('Viscosity of primer by % volume water')
xlabel('% Volume water')
ylabel('Viscosity (cP)')
I just want a matlab graph that basically looks like this, with the extended trendline:

0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!