| Author |
Comment/Response |
Humphrey
|
09/20/07 07:22am
I have defined a new type
(* arithmetic by itself *)
DateSeries /: Times[a_DateSeries, b_DateSeries] :=
If[dsDates[a]==dsDates[b],DateSeries[Transpose[{dlDates[a], \
dsValues[a]*dsValues[b]}]],"Dates don`t match"];
DateSeries /: Divide[a_DateSeries, b_DateSeries] :=
If[dsDates[a]==dsDates[b],DateSeries[Transpose[{dlDates[a], \
dsValues[a]/dsValues[b]}]],"Dates don`t match"];
a * n is the same as Times[a,b] and works
However a/b does not evaluate and need to do Divide[a,b]
Thanks
URL: , |
|