nman84
nman84

Reputation: 435

time series plot on google earth using matlab

I have three sets of data:

  1. time
  2. longitude
  3. latitude

I would like to plot this on google earth using google earth toolbox for matlab, what i need is when i move the time slider a line should be drawn on google earth.

I tried this

   x  = [longitude, latitude];
   y = time;
   kmlStr = ge_plot(x,y);

But an error occured. On the other hand ge_gplot does not make sense for this.

Is there a way i can do this timeseries plot using google earth toolbox?

Upvotes: 0

Views: 686

Answers (1)

tmpearce
tmpearce

Reputation: 12693

Create two vectors: one for x (longitude), one for y (latitude). ge_plot(x,y) will draw a line connecting each pair of (x,y) points in these vectors.

If you want to draw the line as a slider advances, then you need to make use of a callback function. In this function, do ge_plot(x(1:ind), y(1:ind) ) where ind is determined by the "time" value of the slider.

Upvotes: 1

Related Questions