n = 1;
num = (1 - 0.01)/0.01
phi = 0;
For[i = 0, i < num, i++ ,
phi = phi + 0.01;
a = NDSolve[{y''[x] - phi*y[x]^n == 0, y'[0] == 0, y[1] == 1},
y, {x, 0, 1}];
diff = Evaluate[y'[1] /. a];
eta = Evaluate[(diff/phi^2)*((n + 1)/2)];
etastore[i] = eta;
phistore[i] = phi;
]
How do I plot etastore
versus phistore
?
etastore[[i]]
instead ofetastore[i]
. $\endgroup$ – bill s May 3 '16 at 13:30etastore[i]
can be used... $\endgroup$ – xzczd May 3 '16 at 13:41