# ERROR: LoadError: syntax: function argument names not unique

**URL:** https://discourse.julialang.org/t/error-loaderror-syntax-function-argument-names-not-unique/15648
**Category:** General Usage
**Created:** [September 29, 2018, 1:08am UTC](https://discourse.julialang.org/t/error-loaderror-syntax-function-argument-names-not-unique/15648 "2018-09-29T01:08:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gregory](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregory/32/18969_2.png) [@gregory](https://discourse.julialang.org/u/gregory)
#### Post date: [September 29, 2018, 1:08am UTC](https://discourse.julialang.org/t/error-loaderror-syntax-function-argument-names-not-unique/15648/1 "2018-09-29T01:08:03Z")

</div>

I am receiving this weird error.

The code is:

> function absInt(array)  
> newarray = array  
> for n = 1 : length(array)  
> if array[n] \< 0  
> array[n] = -array[n]  
> end  
> end  
> return newarray  
> end
> 
> function CloneBinRepresentation(Nmut)
> 
> ```
> # Number of clones
> Nclones = 2^Nmut
> 
> # Initialize empty arrays:
> # StringRep will contain Nclones strings (2^Nmut in binary)
> # BinRep will set each element to be 0,1
> # e.g. StringRep[i] = '00111' is binary representation of 7.
> # BinRep[i,:] = [0;0;1;1;1] to be used in manipulation to make Q matrix
> StringRep = Array{String}(undef,Nclones)
> BinRep = Array{Int64}(undef,Nclones,Nmut)
> 
> # This loop creates the arrays
> for i = 0 : Nclones-1
> StringRep[i+1] = string(i,base=2,pad=Nmut)
> for j = 1 : Nmut
> BinRep[i+1,j] = parse(Int64,StringRep[i+1][j])
> end
> end
> 
> # We only need the BinRep, but string is given for error checking
> return BinRep,StringRep
> 
> ```
> 
> end
> 
> function Qmatrix(Nmut,mutRate)
> 
> ```
> Nclones = 2^Nmut
> 
> # (BinRep,StringRep) = CloneBinRepresentation(Nmut)
> 
> Q = zeros(Nclones,Nclones)
> 
> for i = 1 : Nclones
> count = 0;
> for j = 1: Nclones
> temp = BinRep(j,:) - BinRep(i,:);
> if sum(temp) == 1 && sum(absInt(temp)) == 1
> Q(i,j) = mutRate;
> count = count + 1;
> end
> end
> Q(i,i) = 1 - count*mutRate;
> end
> 
> return Q
> 
> ```
> 
> end

Q = Qmatrix(3,0.01)

Which returns the error:  
ERROR: LoadError: syntax: function argument names not unique

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [September 29, 2018, 1:29am UTC](https://discourse.julialang.org/t/error-loaderror-syntax-function-argument-names-not-unique/15648/2 "2018-09-29T01:29:01Z")

</div>

> [@gregory](#):
>
> Q(i,j) = mutRate; count = count + 1; end end Q(i,i) = 1 - count\*mutRate;

These are not array indexing, rather function definition syntax in julia. You need to fix all the matlab syntax you have.
