Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to plot some functions with different parameters on the same graph. For each one I have to calculate some parameters from a matrix A. I need to plot this for several matrices A, so I'd like to be able to just copy-paste the new elements in the matrix A, rather than writing them in any other form. But it doesn't want to plot it. What am I doing wrong? Here's the code:

psi[n_, x_] := Exp[-x^2/2] Sqrt[1/(2^n n!)] HermiteH[n, x]

A = {{0, 1.00000000, 0, 0, 0, 0, 0, 0, 0, 0}

{0, 0.96702400, 0, 0, 0, 0.03485079, 0, 0.00757913, 0, 0}

{0, 0, 0, 0.33830360, 0, 0, 0, 0.00747333, 0, 0.00884880}

{0, 0.91306615, 0, 0, 0, 0.12627611, 0, 0, 0, 0}

{0, 0.89336436, 0, 0, 0, 0.15727524, 0, 0, 0, 0.00220772}

{0, 0.87655652, 0, 0, 0, 0.18238453, 0, 0, 0, 0.00976638}}

Plot[Evaluate[

Table[(A[[n]][[1]]*psi[0, x] + A[[n]][[2]]*psi[1, x] +

A[[n]][[3]]*psi[2, x] + A[[n]][[4]]*psi[3, x] +

A[[n]][[5]]*psi[4, x]), {n, 6}] ], {x, -5, 5}]

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

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica problem with plotting

Tags:

Loading...

Similar Threads - Mathematica problem plotting | Date |
---|---|

Mathematica Graph Plotting Problem in Mathematica | Nov 22, 2016 |

Mathematica - Countour plot problem | Jun 10, 2015 |

Problem in reporting contour plot mathematica | Sep 6, 2013 |

[Mathematica] Simple Problem with the plot function | May 8, 2013 |

Plotting problem with Mathematica 8 | Feb 24, 2012 |

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