You could give more details about this formula. For example, what do the S and N functions mean? I imagine that di and fi are, respectively, the distance and frequency at a given instant i. You probably want a 3D graph, or maybe a heat map. Would it be this?
In Matlab, suppose you have two arrays as inputs: f = [f1,f2,...,fn]; d = [d1,d2,...,dn]. First, you need to create a bi-dimensional array (i.e., a matrix) Z as follows:
Z = zeros(n,n);
for i = 1:n
for j = 1:n
Z(i,j) = 10*log(S(f(i),d(j))/N(f(i),d(j)));
end
end
Ps.: You need to specify S(f(i),d(j)) and N(f(i),d(j)) in your code. Furthermore, log means the natural logarithm. If you want the common logarithm (base 10), you should to replace log by log10.
Then, you can plot a 3D graph:
[X,Y] = meshgrid(1:n,1:n); surf(X,Y,Z);
Or, alternatively, you can display an image/heat map:
This would be a 3D plot of f vs. d vs. SNR, provided the signal S and noise N can be calculated from f and d. In that case the MATLAB function plot3 can be used :