Well there are a few ways to do it. The simple method of calculating the derivative is by using the data before/after the point of interest to calculate δy/δx. This is a crude method but it depends on what your teacher is looking for. Consider >>diff(res)/5 to calculate the approximate derivative at each point.
The other method is to use the polyfit function to estimate the coefficients of a polynomial function to your data points. This could be done for a 5th order polynomial (for example) as follows:
>> p=polyfit(time,res,5)
>> p1=[5*p(1) 4*p(2) 3*p(3) 2*p(4) p(5)]
>> derivative=polyval(p1,x) %where x is the point of interest.
if you want to see what polyfit is doing, do the following:
p=polyfit(time,res,5);
x1=linspace(0,75);
y1=polyval(p,x1);
plot(time,res)
hold on
plot(x1,y1)
Once you have the derivative and the point, it is easy to calculate the line and plot using the plot function. Same with the asymptote. Look into ezplot as well if you just want to define a text function rather than calculating and defining points.
Once you have the two lines, calculate the intersection point and use the plot function (type ">>help plot" to see a list of options for plotting points...an example could be >>plot(x1,y1,'rs') to plot a red square at the location.