The property 'PulseDuration' is only valid when the 'PulseType' is 'RZ'. To solve your issue, simply don't specify the Pulse Duration property:
br = 28e9;
SamplesPerSymbol = 25;
z1 = commsrc.pattern(...
'SamplingFrequency',br,...
'SamplesPerSymbol',SamplesPerSymbol,...
'PulseType','NRZ', ...
'OutputLevels', [-475E-3 725E-3], ...
'RiseTime', 10E-12, ...
...'PulseDuration', 35.71E-12 , ...
'FallTime', 10E-12, ...
'DataPattern', 'PRBS7')
w1 = generate(z1,127);
figure(1),plot(w1)
An alternative solution is to use the stimulus object from the SerDes Toolbox
z2 = serdes.Stimulus(...
'SymbolTime',1/br,...
'SampleInterval',1/br/SamplesPerSymbol,...
'Modulation',2,...
'Order',7,...
'MapToVoltage',[-475E-3 725E-3]);
N = SamplesPerSymbol*127;
w2 = zeros(N,1);
for ii = 1:N
w2(ii) = step(z2);
end
figure(2),plot(w2)