Skip to content

Commit

Permalink
Merge pull request #77 from JuliaDiffEq/morrisfix
Browse files Browse the repository at this point in the history
Fix #74
  • Loading branch information
Vaibhavdixit02 authored May 15, 2019
2 parents f63d65d + bd3d68c commit 211de7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/morris_sensitivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ end

function morris_sensitivity(f,p_range,p_steps;relative_scale=false,kwargs...)
design_matrices = sample_matrices(p_range,p_steps;kwargs...)
effects = [[]]
effects = []
for i in design_matrices
y1 = f(i[1])
for j in 1:length(i)-1
Expand Down Expand Up @@ -104,8 +104,8 @@ function morris_sensitivity(f,p_range,p_steps;relative_scale=false,kwargs...)
means = []
variances = []
for k in effects
push!(means,mean(convert(Array, VectorOfArray(k)),dims=2))
push!(variances,var(convert(Array, VectorOfArray(k)),dims=2))
push!(means,mean(k))
push!(variances,var(k))
end
MorrisSensitivity(means,variances,effects)
end

0 comments on commit 211de7b

Please sign in to comment.