Hi,
I am trying to plot a graph representing the discharge of a capacitor in MATLAB, having defined the following function:
function f = discharge (x,a)
f = a(1) + a(2)*(exp(-x/a(3)));
Problem is, when I plot the initial function, the data seemingly don't fit at all! However, when I plot the data as are, without the function, they do appear to be valid.
I have no idea what might be causing this discrepancy and would truly appreciate some assistance.
I am trying to plot a graph representing the discharge of a capacitor in MATLAB, having defined the following function:
function f = discharge (x,a)
f = a(1) + a(2)*(exp(-x/a(3)));
Problem is, when I plot the initial function, the data seemingly don't fit at all! However, when I plot the data as are, without the function, they do appear to be valid.
I have no idea what might be causing this discrepancy and would truly appreciate some assistance.