# set the outputsetterminalsvgsetoutput"example_dft_dct.svg"# axis propertiessetxlabel"n"setxrange[-1:11]setxzeroaxislinetype-1linewidth0.5setyzeroaxislinetype-1linewidth0.5setxticsaxisunsetyticssetkeyoffsetpointsize1.5# Set up a four-pane multiplotsetsize1,1setorigin0,0setmultiplotsettitle"A generic sampled signal"setsize1,0.35setorigin0,0.69plot"example_dft_dct.dat"using1:1withpoints1plot"example_dft_dct.dat"using1:1withimpulses1settitle"The modulus of its DFT"setsize1,0.35setorigin0,0.36plot"example_dft_dct.dat"using1:2withpoints2plot"example_dft_dct.dat"using1:2withimpulses2settitle"Its DCT"setsize1,0.35setorigin0,0.03plot"example_dft_dct.dat"using1:3withpoints3plot"example_dft_dct.dat"using1:3withimpulses3
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
The plot shows the differences between a en:DFT and a en:DCT of a generic signal. The first plot is a sampled ramp in the time domain. The second one represents the modulus of its DFT. The third one the plot of its DCT. I obtained it in a two