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

📄 tabplot.c

📁 su 的源代码库
💻 C
字号:
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       *//* TABPLOT: $Revision: 1.4 $ ; $Date: 94/03/14 14:19:45 $	*//*********************** self documentation **********************//************************************************************************** TABPLOT - TABPLOT selected sample points on selected tracetabplot		tabplot selected sample points on selected trace*************************************************************************** Function Prototype:void tabplot(segy *tp, int itmin, int itmax);*************************************************************************** Input:tp		pointer to a segyitmin		minimum time sample printeditmax		maximum time sample printed*************************************************************************** Authors: CWP: Brian Sumner, Jack K. Cohen**************************************************************************//**************** end self doc ********************************/#include "su.h"#include "segy.h"#define SCREENFUL	19#define PLOTWIDTH	29cwp_String str[] = {	"-----------------------------|",	" ----------------------------|",	"  ---------------------------|",	"   --------------------------|",	"    -------------------------|",	"     ------------------------|",	"      -----------------------|",	"       ----------------------|",	"        ---------------------|",	"         --------------------|",	"          -------------------|",	"           ------------------|",	"            -----------------|",	"             ----------------|",	"              ---------------|",	"               --------------|",	"                -------------|",	"                 ------------|",	"                  -----------|",	"                   ----------|",	"                    ---------|",	"                     --------|",	"                      -------|",	"                       ------|",	"                        -----|",	"                         ----|",	"                          ---|",	"                           --|",	"                            -|",      	"                             *",      	"                             |+",      	"                             |++",      	"                             |+++",      	"                             |++++",      	"                             |+++++",      	"                             |++++++",      	"                             |+++++++",      	"                             |++++++++",      	"                             |+++++++++",      	"                             |++++++++++",      	"                             |+++++++++++",      	"                             |++++++++++++",      	"                             |+++++++++++++",      	"                             |++++++++++++++",      	"                             |+++++++++++++++",      	"                             |++++++++++++++++",      	"                             |+++++++++++++++++",      	"                             |++++++++++++++++++",      	"                             |+++++++++++++++++++",      	"                             |++++++++++++++++++++",      	"                             |+++++++++++++++++++++",      	"                             |++++++++++++++++++++++",      	"                             |+++++++++++++++++++++++",      	"                             |++++++++++++++++++++++++",      	"                             |+++++++++++++++++++++++++",      	"                             |++++++++++++++++++++++++++",      	"                             |+++++++++++++++++++++++++++",      	"                             |++++++++++++++++++++++++++++",      	"                             |+++++++++++++++++++++++++++++",};void tabplot(segy *tp, int itmin, int itmax){	float amp;	/* largest abs(datum) in window		*/	float val;	/* temp for data value			*/	int plt;	/* scaled data value			*/	int i;		/* counter				*/	amp = ABS(tp->data[itmin]);	for (i = itmin + 1; i <= itmax; i++) {		amp = MAX(amp, ABS(tp->data[i]));	}	if (amp == 0.0) { /* data all zeroes, plot zero string */		for (i = itmin; i <= itmax; i++) {			val = 0.0;			printf("%5d %11.4e%s\n", i + 1, val, str[PLOTWIDTH]);		}	} else { /* usual case, plot scaled data */		for (i = itmin; i <= itmax; i++) {			val = tp->data[i];			plt = PLOTWIDTH * (val/amp + 1.0);			printf("%5d %11.4e%s\n", i + 1, val, str[plt]);		}	}	return;}

⌨️ 快捷键说明

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