I have investigated this further and found that the issue is in relation to the fftshift function; taking this out (instead using only fft), and rejigging the code resolves the problem.
I had thought that fftshift was a necessary step in displaying a meaningful fft but this is clearly not the case.
The functioning code is now:
t = linspace(0,1,1000);
fs = length(t)/(max(t) - min(t));
N = (max(t) - min(t))*fs;
y = 0.5*sin(2*pi*100*t) + 0.5*sin(2*pi*50*t);
m = N; % Window length
nfft = pow2(nextpow2(m)); % Transform length
f = (0:nfft/2-1)*(fs/nfft); % Frequency range
P1fft = fft(y,nfft); % DFT
P1fft = P1fft(1:nfft/2); % Discard unnecessary part of spectrum
figure
plot(f,abs(P1fft))
I am still having some problems getting the amplitude scaling correct though - any tips would be well-received!
Cheers,
Mike