View wind.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"header": {"parameterCategory": 2, "parameterNumber": 2, "lo1": 9.249359602308473, "la1": 55.85070694141145, "dx": 0.029743471585207716, "dy": 0.0365760887486843, "nx": 6, "ny": 16, "refTime": "2023-11-24T06:00:00.000Z"}, "data": [5.574723044700687, 7.619567386306366, 2.825262548805914, 3.837937622968217, 5.835497170133532, 7.1744880405002585, 2.648804228427202, 6.111549605740025, 6.877097815611028, 2.2725514656239363, 5.867787200985269, 6.511432784375532, 2.7006211918613725, 4.840395250089012, 6.424692076616517, 7.339452773109874, 3.4274040489087407, 3.5026708937407505, 6.3317374895312595, 7.2260342549888925, 2.6640240046945483, 6.089819491976226, 7.39159779236442, 2.7363550078913312, 5.458933321854281, 7.4013635452578415, 3.4022771762934085, 4.370372024198471, 7.042073573522599, 6.616500914811612, 4.057345102872524, 3.377614307069232, 6.271802399149777, 6.786152073448418, 3.052092197057784, 5.464956842397208, 7.334254729720126, 3.5039990386101936, 4.551762753664564, 7.592919020706147, 4.1898064575950995, |
View gp.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gp(nnls::Function,A::AbstractMatrix,b::AbstractVector,x0::AbstractVector,maxit::Integer) | |
obj = zeros(maxit) | |
x = x0 | |
for i = 1:maxit | |
f,g,r = nnls(A,b,x) | |
g[(x.==0.0) & (g.>0.0)] = 0.0 | |
alpha = dot(A*g,r)/dot(A*g,A*g) | |
x = x-alpha*g | |
x[x.<0.0] = 0.0 | |
obj[i] = f |
View func.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function func(b,x,Fps) | |
r = fftshift(ifft(fft(x).*Fps)) - b; | |
return r | |
end |