hello,
I'm trying to plot the points of a vector to see if it looks like I want it to, but I get a blank figure. can anyone please advice me on what's wrong with my code?
% units %
lambda = 1; L = 10; N = 500; a = 1; V0 = 5;% Create lattice points %
dx = L/N;x = zeros([1 N]);for n = 1:N x(n) = -L/2+(n-0.5)*dx;end% define potential %
Vho = zeros([1 N]);for i = 1:N Vsw = -V0*(heaviside(x(i)+a/2)-heaviside(x(i)-a/2));endfigureplot(Vsw)
Thank you very much for your help!
Best Answer