Debugging, but code in conjugate gradient implementation.


#1

Not sure this is the right place, but there seems to be an issue with how Julia is interpreting the inputs of a function. I am certain my code is correct as far as implementation of the problem statement. However, I keep getting the error at the bottom “MethodError: no method matching colon(::Int64, ::Tuple{Int64})”. Why is Julia interpreting some inputs as a tuple and one float?


#2


#3

N will always be a tuple in N = size(U) – you probably want something like size(U, 1) or length(U).


#4

That’s some high quality photo for such piece of text :wink:


#5

N = size(U, 1)