x=-1:0.5:1;for i=1:5 f(i)=1/(1+25*(x(i)^2));end[x;f]这样就能显示出每个x对应的f值了。希望对你有用~
x=-1:0.5:1;f=1/(1+25*(x.^2));