1function g = get_gvalueFromIncomingField(t,s,j,beta,mu,t0)
2% GET_GVALUEFROMINCOMINGFIELD get data from incoming field
3%
4% g = get_gvalueFromIncomingField(t,s,j,beta) returns the data g for each spring
5% scatterer condition at a time 't'. 's' is a vector containing the source
6% locations s = [s(1),...,s(M)], where 'M' is the number of sources.
7% 'beta' is a factor of the spring constant, and 'j' represents the index
8% of the current spring scatterer. 'mu' and 't0' are parameters needed for
9% the incident wave.
11x = s(j);
12uin = get_uIncident(x,t,mu,t0);
13g = beta*uin;
15% testing
16% g = beta*cos(10*(s(j) - t - t0));
18end