To plot a logistic model in MATLAB, you can follow these steps:
main.m93 chars4 lines
The logistic function takes three parameters:
params(1)
is the maximum value of the curve (i.e., the upper asymptote)params(2)
is the steepness of the curve (i.e., the slope at the midpoint)params(3)
is the midpoint of the curve (i.e., the x-value at the inflection point)main.m61 chars3 lines
lsqcurvefit
function in MATLAB:main.m106 chars3 lines
main.m184 chars10 lines
This will produce a graph with the data plotted as points and the fitted logistic curve as a line. The x and y axes are labeled, and there is a legend indicating which curve is which.
gistlibby LogSnag