Student Support Forum: 'Adding two interpolation functions' topicStudent Support Forum > General > "Adding two interpolation functions"

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response Peter Pein 09/18/09 10:53am Hi Alex, try the usual syntax of a function definition: comb[t_]=d[t]+l[t] For example: In[1]:= {d, l} = {d, l} /. First[NDSolve[{Derivative[1][d][t] == l[t], Derivative[1][l][t] == -d[t], d[0] == 0, l[0] == 1}, {d, l}, {t, 0, 2*Pi}]]; In[2]:= comb[t_] = d[t] + l[t] Out[2]= InterpolatingFunction[][t] + InterpolatingFunction[][t] then Plot[comb[t] - Sin[t] - Cos[t], {t, 0, 2*Pi}] looks funny due to rounding. Peter URL: ,

 Subject (listing for 'Adding two interpolation functions') Author Date Posted Adding two interpolation functions Alex 09/16/09 09:48am Re: Adding two interpolation functions yehuda ben-s... 09/16/09 11:15pm Re: Re: Adding two interpolation functions Vasilis 08/16/12 10:33am Re: Adding two interpolation functions Peter Pein 09/18/09 10:53am
 < Previous Comment Help | Reply To Comment | Reply To Topic