/ concept-collection / windowedFourierProjection
Sign in
concept-collection / windowedFourierProjection
windowedFourierProjection / wfp_1Dspringscattering / get_gvalue.m
15 lines · 708 BCodeBlameHistory
8748c66added codenalhassanieh 1function g = get_gvalue(t,s,j,sig,beta,M,mu,t0,addProj)
2% GET_GVALUE get the data at a given time t
3%
4% g = get_gvalue(t,s,j,sig,beta,M,mu,t0) 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. 'sig'
7% is a cell that holds manufactured density values (Gaussians) where
8% sig{j} = @(t) exp(mu(j)*(t - t0(j))). 'beta' is a factor of the spring
9% constant, and 'j' represents the index of the current spring scatterer
11xval = s(j); % location at the current source
12U = get_ExactSol(xval,t,mu,t0,M,s,addProj); % get the manufactured solution at xval
13g = -sig(t,j) - beta*U;
15end
moveopenescclose