# Combine series temporales

TimeSeriesThread puede ser usada para agregar, multiplicar o de otra forma combinar series temporales.

Reste dos series temporales.

 In[1]:= X{buseyOpen, buseyClose} = Table[TimeSeries[ FinancialData["NASDAQ:BUSE", prop, {{2013, 6, 1}, {2014, 6, 1}}]], {prop, {"Open", "Close"}}];
 In[2]:= Xdiff = TimeSeriesThread[{1, -1}.# &, {buseyClose, buseyOpen}]
 Out[2]=
 Out[3]=

Construya la serie temporal de la distancia angular entre la Luna y el Sol.

 In[4]:= Xdates = DateRange[{2014, 4, 1}, {2014, 6, 1}, {12, "Hour"}]; sunpos = SunPosition[dates, CelestialSystem -> "Equatorial"]; moonpos = MoonPosition[dates, CelestialSystem -> "Equatorial"];

Defina la función para calcular la distancia angular entre dos objetos en una esfera.

 In[5]:= XAngularDistance[{{\[Phi]1_, \[Theta]1_}, {\[Phi]2_, \[Theta]2_}}] := InverseHaversine[ Haversine[\[Phi]1 - \[Phi]2] + Cos[\[Phi]1] Cos[\[Phi]2] Haversine[\[Theta]1 - \[Theta]2]]/Degree
 In[6]:= Xangdist = TimeSeriesThread[AngularDistance, {sunpos, moonpos}];
 In[7]:= XDateListPlot[angdist, ImageSize -> 300, FrameLabel -> "degrees"]
 Out[7]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »