Hello. Can someone tell me what I can do to the following code fragment:(adsbygoogle = window.adsbygoogle || []).push({});

sigma = {2,4,6,8}

mu = {1,3,5,7}

gauss[x_, mu_, sigma_] = (1/(2*\[Pi] * sigma^2))*

E^-((x - mu)^2/(2*sigma^2))

lorentz[x_, m_, gamma_] = 1/(\[Pi]*gamma*(1 + ((x - m)/gamma)^2))

spec1 = Apply[Plus, gauss[x, mu, sigma]]

spec2 = Apply[Plus, lorentz[x, mu, sigma]]

spec1 and spec 2 correctly appear as sums of multiple terms, but I cannot plot either as a function of x. Where have I gone wrong?

thanks for any help

**Physics Forums - The Fusion of Science and Community**

# Adding many functions in mathematica

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Adding many functions in mathematica

Loading...

**Physics Forums - The Fusion of Science and Community**