I have tried plotting graphs with dspPlot as explained by Prof. Paolo Prandoni and Prof. Martin Vetterli in their site but failed. They have run the following code to generate curve in their DSP book available online in their site. However, when I run the same, it does not work. Anybody can help me out please. [I wrote to authors few days back and reply is yet to receive from their end]
\documentclass[a4paper,11pt]{ltxdoc}
\usepackage{float}
\usepackage{fancyvrb}
\usepackage{enumitem}
%\usepackage{courier}
\usepackage[utopia]{mathdesign}
\usepackage{dspTricks, dspFunctions, dspBlocks}
\newenvironment{centerfig}{%
\begin{figure}[H]
\begin{center}}{
\end{center}
\end{figure}}
\begin{document}
\begin{centerfig}
\begin{dspPlot}[sidegap=0.5,yticks=none]{-6, 6}{-1.2, 1.2}
\def\signal{ 0.5235 mul RadtoDeg sin }
\def\quantize{ dup 0 gt {-0.5} {0.5} ifelse sub truncate }
\dspFunc[linecolor=gray,linewidth=2pt]{x \quantize \signal }
\dspFunc[linestyle=dotted,linewidth=1pt]{x \signal}
\dspSignal{x \signal}
\end{dspPlot}
\end{centerfig}
\end{document}
Program fragment and its output is appended below for your kind reference:
Error I got after running the code is:
! Undefined control sequence.
<recently read> \c@lor@to@ps
l.19 ...sidegap=0.5,yticks=none]{-6, 6}{-1.2, 1.2}
?