figure(3)
subplot(211)
plot(Sdb)
- hold on;
- plot(20*log10(abs(Aw(1:256))),'g')
- hold off;
+ title('Mag (dB)');
subplot(212)
plot(phase(1:256))
hold on;
- plot(angle(Aw(1:256)),'g')
+ plot(angle(Aw(1:256))+0.5,'g')
hold off;
+ title('Phase (rads)');
figure(4)
plot(s)
--- /dev/null
+% save_array_c_header.m
+%
+% David Rowe Sep 2015
+
+function save_array_c_header(array, array_name, filename)
+ f=fopen(filename,"wt");
+ fprintf(f,"/* Generated by save_array_c_header.m Octave function */\n\n");
+ fprintf(f,"const int %s[]={\n", array_name);
+ for m=1:length(array)-1
+ fprintf(f," %f,\n",array(m));
+ endfor
+ fprintf(f," %f\n};\n",array(length(array)));
+ fclose(f);
+endfunction