Tomas6
Electrical
- Nov 9, 2005
- 1
Does anyone know how to change the frequency of this square wave? I don't want to use the Matlab square(T) function. I'm pretty sure there is more code needed to add to this.
When I chenge the line y = [ones(L/2),zeros(L/2)]; to
y = [ones(L/4),zeros(L/4)]; it won't plot.
I'm stumped.
Thanks for help-
Tom
x = 1:100;
L = length(x);
y = [ones(L/2),zeros(L/2)];
plot(x,y)
When I chenge the line y = [ones(L/2),zeros(L/2)]; to
y = [ones(L/4),zeros(L/4)]; it won't plot.
I'm stumped.
Thanks for help-
Tom
x = 1:100;
L = length(x);
y = [ones(L/2),zeros(L/2)];
plot(x,y)