How to extend exponential fitted line to extrapolate values

12 visualizzazioni (ultimi 30 giorni)
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:

Risposta accettata

Matt J
Matt J il 7 Dic 2021
xx=linspace(0,85,500);
plot(xx,f(xx))

Più risposte (0)

Categorie

Scopri di più su Interpolation in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by