Hi,
Let us do things the easy way.
I assume you want to compare your core fft output with matlab fft.
This should be very easy, I suggest you consider the following:
1) ignore plot(2) altogether.
2) your sine input:
you need to scale it to 12 bits then round it and input it to Matlab fft.
and you need to convert these decimal values to 2's complement(12 bits) for the core(unless it uses a different scheme).
3) all what is left is compare output(should be almost bit-accurate apart from rounding effect) for both real and imaginary components.
Make sure you read core output when it is ready. Remember core fft is block based and is only ready after some time. Also remember to round up matlab fft output.
you better compare data directly instead of the spectrum at this stage. Your data must be identical and that tells it all.
for step (2)
to scale the sine wave from(-1 to +1) into 12 bit signed you need this:
data = round((2^11-1)*sine_data/max(sine_data));
this to input to matlab fft
for core fft you need decimal to 2's complement conversion of data...
You can use the function dec2bin() but after some trick as the function doesn't accept signed values, you can convert them to equivalent unsigned first then enter them in dec2bin().
Most importantly, the frequency grid(fft resolution) should be same in both cases.
hope this helps
kaz