ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Array Operations
Posted by Dimitry on Feb-18-2013 23:25
Peter,
Your ArrayMath library has been very helpful and fast, there is a problem though I
could not solve using it:

I have a Long array of linear data (DataArray()) plotted against DateTime
(TimeStamps()), they are the same length.

I have 12 monthly multipliers I need to apply to DataArray and I can't think of a good
way of doing it. Anything I tried is too slow, because of the size of the data...

Thank you,
Dimitry

  Re: Array Operations
Posted by Peter Kwan on Feb-19-2013 03:00
Hi Dimitry,

I assume you mean you need to multiple the data using a different value depending on the month of year.

If I were you, I would just multiple it with normal VB code:

For i = 0 To Ubound(DataArray)
     DataArray(i) = DataArray(i) * Multiplier(TimeStamps(i).Month - 1)
Next

Hope this can help.

Regards
Peter Kwan