⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plot_letter.c

📁 speech signal process tools
💻 C
字号:
/*--------------------------------------------------------------+|								||   This material contains proprietary software of Entropic	||   Processing, Inc.  Any reproduction, distribution, or	||   publication without the the prior written permission of	||   Entropic Processing, Inc. is strictly prohibited.  Any	||   public distribution of copies of this work authorized in	||   writing by Entropic Processing, Inc. must bear the notice	||								||          "Copyright 1986 Entropic Processing, Inc."		||								|+---------------------------------------------------------------+|								||  plot_letter -- plot a letter from 2 floating-point arrays	||								||  Ajaipal S. Virdy, Entropic Processing, Inc. 			||								||  Module:	plot_letter.c					||								||  Given arrays of x- and y-coordinates, plot_letter writes plot||  commands in ``Stanford'' plotas input format to plot the	||  line connecting the points with the given coordinates.  The	||  argument len is the number of points to plot; xmin ... ymax	||  are the data coordinates that are to correspond to the	||  edges of the plot.						||								|+--------------------------------------------------------------*/#ifdef SCCS    static char *sccs_id = "@(#)plot_letter.c	1.1 1/6/87 EPI";#endifplot_letter(xdata, ydata, len, color, xmin, xmax, ymin, ymax, letter, ux, uy, lx, ly)double	xdata[], ydata[];int	len, color;double  xmin, xmax, ymin, ymax;char	letter;int	ux, uy;int	lx, ly;{    int ix, iy, i;    int	width, height;    printf("c %d\n", color);    width = lx - ux;    height = ly - uy;    for (i = 0; i < len; i++)    {        ix = 0.5 + ux + width * (xdata[i] - xmin)/(xmax - xmin);        iy = 0.5 + ly - height * (ydata[i] - ymin)/(ymax - ymin);        printf("m %d %d\nt 3 1\n%c\n", iy + 15, ix - 20, letter);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -