I'm a newbie on use of matlabMATLAB and also in signals and systems. I need clarification and guide (with fundamental explanations please) on above.
I want to generate a sampled square wave in matlabMATLAB with following criteria;
Signal duration T=5s$T=5\mathrm{s}$, Sample frequency fs=40Hz$f_s=40\mathrm{Hz}$. there are supposed to be fsT signal points (what does this mean please). tau=1/100. the square wave signals are zeros for the first fsT$f_sT$ signal points (1-tauwhat does this mean please)/2. $\tau=1/100$. the square wave signals are zeros for the first $\frac{f_sT(1-\tau)}{2}$ points and also for the last fs*T(1-tau)/2$\frac{f_sT(1-\tau)}{2}$ points. they are one otherwise.
What I have done so far:
clear all
fs = 40; t = [0:1/fs:5]; dc = 50; x = square(2pit); %f=1 for a square wave
plot (t,x);
clear all
fs = 40;
t = [0:1/fs:5];
dc = 50;
x = square(2*pi*t);
%f=1 for a square wave
plot (t,x);
Am I right? I have no idea how to use tau, and what signal points imply here. Kindly assist. Thank you.