

b = linspace(0, (pi/2), 1024);
a = sin(b);

a = round((a*2^31));

i = [0 : 1023];

fileID = fopen('sine_values.txt','w');


out_vec = linspace(0, 0, length(a)*2);
out_vec(1 : 2 : length(a)*2) = i;
out_vec(2 : 2 : length(a)*2) = a;

fprintf(fileID, '%d => x"%08x",\n',out_vec); % fprintf made it hard for me to just output two single vectors in a row --> index "i" + "a" so out_vec has been built up as a workaround
fclose(fileID);