Please note that the above pulse is in fact in discrete-form as you can infer from the time vector "t" which is sampled at 100 hz (0.01s) for 10 seconds of signal length. Therefore, if your sample rate is denoted by "fs" and the signal duration is "tend", you would define a time vector t as:
fs = 1e3; %1KHz sample rate
tend = 1; % duration of signal
t = 0:1/fs:tend; % time vector
For a repetition frequency of 3 Hz and pulse width of 0.1s, we can define the delay vector as:
repfreq = 3; %3 Hz w = 0.1; % 0.1s pulse width
d = 0:1/repfreq:tend % Delay starts at t = 0 and therefore the pulse function is evaluated length(d) times
Please note here that delay vector is an arbitrary vector that defines the number of times the pulse function is evaluated and may also be defined in terms of being a multiple of the pulse width as you see above.
Finally, we can call the PULSTRAN function with appropriate arguments as follows:
y = pulstran(t,d,'rectpuls',w);
The documentation for PULSTRAN function below also explains in greater detail about how the "delay" vector is defined.