Don't understand what this error is saying. I just want to evaluate the equation for each value of fD and store the value in the array "b".
The code
Code
B = 200e3; %3dB Bandwidth (200 kHz)
T = 500e-6; %Pulsewidth (100 us)
t = 0:1e-7:T; %Plotting variable
LFMwaveform = @(x) (1/sqrt(T))*exp(i*((pi()*B*(x.^2))/T));
b = zeros(5001,0)
for fD = 1:5001
b(fD) = LFMwaveform(t).*exp(j*2*pi().*fD);
end
The error
Code
In an assignment A(:) = B, the number of elements in A and B must be the same.
Error in WorkAssignment1_V2 (line 33)
b(fD) = LFMwaveform(t).*exp(j*2*pi().*fD);
I made the size of "b" 5001 because that's the size of LFMwaveform, but it didn't fix the issue.
Any ideas?