g_puffo
g_puffo

Reputation: 623

Writing a simple user-defined function in Maple

I'm a total novice in Maple (I usually use R) but I'm trying to do some analytic transformations on a user-defined function, hence my choice of Maple.

The function is in t and I have a vector of known values (basically, known constants) (t_1,..., t_n) which is passed to the function and I also know the values for alpha, beta and miu.

enter image description here

I cannot figure out how to code the summation of exponentials in Maple: in R I would simply use sum().

I have looked at the examples in http://www.maplesoft.com/support/help/maple/view.aspx?path=sum but none seems to apply to my case. I don't want to evaluate the function but I want to be able to find, analytically, the integral or the derivative of it (or of functions of it.)

Links to manuals or web-pages that deal with similar problems/cases are very much welcome!

Upvotes: 1

Views: 220

Answers (1)

Carl Love
Carl Love

Reputation: 1471

Make the vector of constants global, not passed in. I'll call it T. Then the function is

lambda:= t-> mu+alpha*add(exp(-beta*(t-tau)), tau= T);

Upvotes: 3

Related Questions