I have 3 dictionaries, A and B:
A = Dict("1" => 0.1
"3" => 0.1
"5" => 0.1
"7" => 0.1
"9" => 0.1
"11" => 0.1
"13" => 0.1
"15" => 0.1
"17" => 0.1
"19" => 0.1)
B = Dict("1" => 0.2
"5" => 0.1
"7" => 0.1
"9" => 0.1
"11" => 0.2
"15" => 0.1
"17" => 0.2)
C = Dict("1" => 0.1
"3" => 0.2
"7" => 0.1
"9" => 0.2
"13" => 0.1
"15" => 0.1
"17" => 0.1
"19" => 0.1)
If I am going to get a vector/matrix of the values of A, I have to A = [collect(values(A))]
.
A = 1-element Vector{Vector{Any}}:
[0.10, 0.10, 0.10, 0.10, 0.10, 0.10, 0.10, 0.10, 0.10, 0.10]
If I do the same to Dictionary B:
B = 1-element Vector{Vector{Any}}:
[0.10, 0.10, 0.10, 0.10, 0.10, 0.10, 0.10]
I want to do the same to B and C but Dictionary B does not contain keys/values “3” => 0.1, “13” => 0.1, “19”=>0.1 and Dictionary C Dows not contain “5” => 0.1, “11” => 0.1. What should I do in order to assign ZEROS to the values of the keys in dictionary B and C not found in A. Like this:
New_B = 1-element Vector{Vector{Any}}:
[0.10, 0, 0.10, 0.10, 0.10, 0.10, 0, 0.10, 0.10, 0]
New_C = 1-element Vector{Vector{Any}}:
[0.10, 0.10, 0 , 0.10, 0.10, 0, 0.10, 0.10, 0.10, 0.10]
Thanks for the help!