MATLAB: Is there a way to find slope at any point on the graph

MATLABslope

I have plotted a graph (I-V curve of transistor) and I need to find slope at various points as encircled. What is the way to do so? Thanks, Kany

Best Answer

The easiest way is to use the gradient function. (I believe you forgot to upload your plot, but that doesn’t affect my Answer.)
If you then want the slope at particular values of your x-variable, use the find function to detect the indices of those values, then use the indices to find the value of the gradient at those values.