Skip to content

Commit 816c76b

Browse files
authored
Add files via upload
1 parent 68cfcc1 commit 816c76b

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

Example1.mlx

395 Bytes
Binary file not shown.

Example2.mlx

1.75 KB
Binary file not shown.

windSimFast.m

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
% the ground in high winds.
4444
% Quarterly Journal of the Royal Meteorological Society, 87(372), 194-211.
4545
%
46-
% Author: E. Cheynet - UiS - last modified : 25-08-2018
46+
% Author: E. Cheynet - UiS - last modified : 13-05-2020
4747

4848
%% Input parser
4949
p = inputParser();
@@ -104,17 +104,12 @@
104104

105105
[L,D]=ldl(S,'lower'); % a LDL decomposition is applied this time
106106
G = L*sqrt(D);
107-
108-
theta = atan2(imag(G),real(G));
109-
A(ii,:)= (G.*exp(-1i*theta))*exp(1i*2*pi*randPhase);
107+
A(ii,:)= G*exp(1i*2*pi*randPhase);
110108
if ii==2, fprintf(['Expected computation time: From ',num2str(round(min(toc(tStart))*Nfreq/2)),' to ',num2str(round(min(toc(tStart))*Nfreq)),' seconds \n']); end
111109
end
112110

113111
%% Apply IFFT
114-
115-
Nu = [A(1:Nfreq,:) ; real(A(Nfreq,:)); conj(flipud(A(2:end,:)))];
116-
% zero mean
117-
Nu(1,:) = 0;
112+
Nu = [A(1:Nfreq,:) ; real(A(Nfreq,:)); conj(flipud(A(2:Nfreq,:)))];
118113
speed=real(ifft(Nu).*sqrt(Nfreq./(dt)));
119114

120115
u = speed(:,1:Nm);

0 commit comments

Comments
 (0)