help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lost with working/non-working code


From: João Rodrigues
Subject: Re: Lost with working/non-working code
Date: Sat, 01 Mar 2014 15:15:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0


error: rparcellfun: subscript indices must be either positive integers less than 2^31 or logicals

Using the only way I know to debug in Octave (adding printfs), I managed to notice that crash is happening on this matrix multiplication:

        a{i} = sigmoid(Thetas{i-1} * a{i-1});

I checked the matrices sizes and they are correct. I tried to put the multiplication outside the function call, and it fails as well.

Did you check the type (whos) and range of "i"?
It should be an integer, if your iteration starts at 1 then (i-1) would be zero, "i" should also be smaller than 2^31.

Assuming "i" is yielding valid iterators, did you check the type (whos) of Theta{i} and a{i}? Maybe they're not real but have some other type that doesn't allow matrix multiplication.

j


reply via email to

[Prev in Thread] Current Thread [Next in Thread]