Well, in a numerical technique test we were given the following problem:
A physical phenomenon is modeled such that,
$F(f,d) = A(f)/d^2 + L$;
Where, $F$ is a function of frequency $f$ and distance $d$, and $L$ is random error. Function $A(f)$ is unknown.
A function is given, to produce data set $(F,f,d)$. The function is:
function F = get_data(d,f) for i= 1:length(f) for j = 1:length(d) F(i,j) = 2*f(i)^2 / d(j)^2 + 0.3*rand()*(1-rand()); end end end
here d, f are arrays. F is a 2D array. rand is a function that gives some random numbers less than 1. It is assumed that, we cannot poke into this function for an answer. We can't just look at the function and say A(f) = 2*f^2. We have to find this or a very close approximation to this by some numerical method....
Now, for d = 1:1:10; f = 30:30:300;
we have to produce a data set for $F$. From, this data set, we have to calculate, (1) mean of $L$. (2) an expression for $A(f)$.
Now, what I understand is that, 2nd if we have $A(f)$ then we can produce the values of $L$, and can easily evaluate mean of $L$. And, for $A(f)$ we could assume $L$ to be too low that we can ignore......
But, how could I actually do it?
I'll be very happy if someone helped me.