In the following program, I want to generate four graphs by iterating the variable n and plotting the results as a 2 X 2 grid. The iterator does not seem to be working as expected even though it is in the correct format {n, nmin, nmax, dn}. The code completes the first iteration when n=5, but it does not finish for the other values of n. Where in my syntax is the problem?
Try this
graphs = Table[Plot[{x, Evaluate[f[x, n]]}, {x, 0, \[Pi]}, Ticks -> {{0, \[Pi]}, {1, 2, 3}}], {n, 5, 35, 10}];
Evaluate is needed because Plot has the HoldAll attribute.
Evaluate
Plot
HoldAll
Attributes[Plot] (* {HoldAll, Protected, ReadProtected} *}
Thanks