3

I'd like to translate the following Matlab function

ts = resample(ts,Time) resamples the timeseries object ts using the new Time vector.

in java.

For the moment, I could not find any similar java libraries performing this feature of matlab.

My "ts" in java is for the moment similar to an arrayList of coordinates. A coordinate is that (ti,xi,yi,zi) And my Time in java is an ArrayList of Double.

Please help me, I am completely stuck!

Best regards,

Sofia

Souf
  • 31
  • 2
  • Hint: Start by writing an example of some input and the desired output. Is this homework? – leonbloy Jun 27 '11 at 17:10
  • you have a result timeseries with data (like ti xi yi zi) that you want to resample based on this reference timeseries (t_ref_i). So the idea is to obtain the resampled series of data (t_ref_i x_res_i y_res_i z_res_i). I solved the pb by doing a simple linear interpolation (but the range of the ref timeseries has to be smaller than the range of the results timeries with data) – Souf Jun 29 '11 at 08:46

1 Answers1

0

I just checked the source of the matlab function to understand what they are doing, because I know of two projects, bit still I'm not sure if they can provide you with exactly what you want. So you have to talk to them by your self.

The page WEKA and the javadoc look in ( filters.unsupervised.instance ) and another one is KNIME the have a transformer for row sampling, so maybe this is something for you.

bye

Christian
  • 1,664
  • 1
  • 23
  • 43
  • Thank you for your help. I decided to compute the simpliest resampling (linear interpolation). So, I have a timeRefList and a timeResultList. The idea is to resample the timeResultList based on the timeRefList using linear interpolation for the data linked. – Souf Jun 29 '11 at 08:40