Dear All,

How can we fix the issues from mixed type variable in Julia? now I convert these loops from Matlab to Julia; However, It seems not working in Julia …

**Matlab**

p = 1.0;

pr = 3.0;

tp = 2.0;

for i = 1:fix(pr/2)

inv = 1/nchoosek(pr,i);

mpi = min(p,i);

for j = max(0,i-tp):mpi

bezalfs(i+1,j+1) = inv*nchoosek(p,j)*nchoosek(tp,i-j);

bezalfs(pr-i+1,p-j+1) = bezalfs(i+1,j+1);

end

end

**Julia:**

p = 1.0

pr = 3.0

tp = 2.0

bezalfs = Array{Float64}(undef, 4, 2)for i = 1:round(pr/2)

inv = 1/binomial(pr,i)

mpi = min(p,i)

for j = max(0,i-tp):mpi

bezalfs[i+1,j+1] = inv*binomial(p,j)*binomial(tp,i-j);

bezalfs[pr-i+1,p-j+1] = bezalfs[i+1,j+1];

end

end

Solution(Matlab)

bezalfs =

`0 0 0.6667 0.3333 0.3333 0.6667`

**Question: how can we solve this bug in a brilliant way in Julia?**