What is the slope of a transfer function? Lets say I have a Transfer function (H) plot as below. I need to find the SLOPE of the transfer function in dB/MHz.



That is... i need a plot (db/MHz) vs frequency. 

How can i go about it ? 

f = 0: 1e6 : 80e6;
H_db=20*log10(abs(H));
s=diff(H_db);
plot(f/1e6,s);


Do i need steps of 1 Mhz .. then its in db/Mhz.. or do i need to divide s with something ?

or am i thinking about this all wrong ?

(update)

Lets say i have a transfer function below: 



and then i find the db/mhz vs mhz plot using the following code:

step_size=1e6;
f_H = 0: step_size: fs_ADC+step_size;    % i am using 'f_H' and 'f' since with diff function in the end I am short of one index for ploting.. i hope this is correct
f = 0: step_size: fs_ADC;
H = fir1(f_H); 
H_db=20*log10(abs(H)); 
ss=diff(H_db);  % is this correct ?
plot(f/1e6,ss)




or should i use :

ss=diff(H_db)./diff(f_H);
plot(f/1e6,ss)


Then i get the below figure: .. now i get the 10^-5 on the yaxis. 



Please let me know
Okay. I think i got it after some clarification from Dan. Thanks Dan. !

I think what i was confused with was the step size in my frequency vector.. i had thought to have the final result in db/mhz.. the steps should be in 1 Mhz.. but i now realize that the freq vector could be in whatever steps i like but if its in Hz then i need to have my final answer normalized by 1e6 to get from  db/Hz --> db/Mhz

So this is the code i finally used..

fs_ADC=200e6;
N=2^11;
step_size=fs_ADC / N ;
f = 0: step_size: fs_ADC;
H = fir1(f);  
H_db=20*log10(abs(H));
slope=1e6*diff(H_db)./diff(f);  % db/Hz--&gt; db/mhz
plot(f(1:end-1)/1e6,slope) 


Figure result till 30 MHz is shown below: