octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #8670] macd function for financial package


From: Parsiad Azimzadeh
Subject: [Octave-patch-tracker] [patch #8670] macd function for financial package
Date: Wed, 20 May 2015 04:58:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

Follow-up Comment #4, patch #8670 (project octave):

MATLAB test:

>> d = [46.84 47.07 45.92 47.24 47.64 47.3 48.22 46.98 46.41 44.78 46.29 47.99
47.47 49.19 48.85 48.13 49.13 50.91 51.01 50.48 50.88 51.2 50.85 50.16 48.44
49.1 47.67 45.43 46.47 48.76 50.08 50.74 51.91 51.11 49.36 48.96 49.28 49.02
48.24 49.71]; 
>> [a, b] = macd (d)

a =

  Columns 1 through 15

       NaN       NaN       NaN       NaN       NaN       NaN       NaN      
NaN       NaN       NaN       NaN       NaN       NaN       NaN       NaN

  Columns 16 through 30

       NaN       NaN       NaN       NaN       NaN       NaN       NaN      
NaN       NaN       NaN    1.1093    0.8760    0.5046    0.2908    0.3027

  Columns 31 through 40

    0.4138    0.5488    0.7417    0.8205    0.7333    0.6248    0.5581   
0.4788    0.3489    0.3605


b =

  Columns 1 through 15

       NaN       NaN       NaN       NaN       NaN       NaN       NaN      
NaN       NaN       NaN       NaN       NaN       NaN       NaN       NaN

  Columns 16 through 30

       NaN       NaN       NaN       NaN       NaN       NaN       NaN      
NaN       NaN       NaN       NaN       NaN       NaN       NaN       NaN

  Columns 31 through 40

       NaN       NaN       NaN    0.6626    0.6768    0.6664    0.6447   
0.6115    0.5590    0.5193

>> [a, b] = macd (d, 1)
Error using macd>errormessage (line 152)
There must be at least 26 nonNaN values in each set of observations.

Error in macd (line 91)
         errormessage(E, 26);
 
>> [a, b] = macd (d', 2);
Error using macd>errormessage (line 152)
There must be at least 26 nonNaN values in each set of observations.

Error in macd (line 108)
         errormessage(E, 26);
 


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8670>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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