You probably defined an f!(x) function earlier in your REPL session. 
Restart the REPL or run workspace()and try again.

On Sunday, June 12, 2016 at 8:27:32 PM UTC+2, digxx wrote:
>
> Thx evan.
> just to clarify: when calling:
> function f(a,farr)
> for i=1:n
> for j=1:n
> farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i]
> end
> end
> end
>
> f(x) with my previously defined x I get an error
>
> while calling
>
> function f!(a,farr)
> for i=1:n
> for j=1:n
> farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i]
> end
> end
> end
>
> f!(x) I get some result which is nonsense (in this case x^2)
> but it doesnt show up an error...
>
> I know the original purpose is to specify farr as second argument to fill 
> it. That both works
>

Reply via email to