Capsim Block Documentation
Plot probe.
int samples; int i,j,k,ii; int operState; char curveTitle[80]; char curveSubTitle[80]; char fname[100]; FILE *time_F; |
---|
/* * store as state the number of input/output buffers */ if((ibufs = NO_INPUT_BUFFERS()) <= 0) { fprintf(stderr,"plot: no inputs connected\n"); return(2); } if((obufs = NO_OUTPUT_BUFFERS()) > ibufs) { fprintf(stderr,"plot: too many outputs connected\n"); return(3); } if(ibufs > MAX_NUMBER_OF_PLOTS) { fprintf(stderr,"plot: too many plots requested. \n"); return(4); } if(control && mode == DYNAMIC) { /* * allocate arrays */ xpts = (float* )calloc(npts,sizeof(float)); if(xpts==NULL) { fprintf(stderr,"Could not allocate space in plot \n"); return(5); } for(i=0; i |
---|
for(samples = MIN_AVAIL(); samples > 0; --samples) { for(i=0; i |
---|
if(control == 0) return(0); if((totalCount - skip) > 0 ) { { strcpy(fname,title); strcat(fname,".tim"); time_F = fopen(fname,"w"); for(k=0; k |
---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks) Copyright (C) 1989-2017 Silicon DSP Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.silicondsp.com Silicon DSP Corporation Las Vegas, Nevada */ |
---|
/* plottxt.s */ /********************************************************************** plot() *********************************************************************** inputs: (arbitrary number) outputs: (optional feed-through of input channels) parameters: int npts, the number of points to plot int skip, number of points to skip before first plot file title, the title of the plot file x_axis, the title for the x_axis file y_axis, the title for the y_axis int plotQ plot quality flag 0 = high , 1 = low ************************************************************************* This routine will produce a set of plots from an arbitrary number of input channels. Optionally, the input channel data can 'flow through' to the correspondingly numbered output channel. This is useful if this star is to be placed in line in a simulation (e.g. probe). The first parameter represents the number of points plotted from each channel. EVERY TIME this number of points is input, a new set of plots will be generated. Default is set to (int 500). The second parameter is the number of points to skip before the first plot set is presented. This enables skipping of any transient period. Default is set to (int 0). The third parameter represents the title for the plot. Default is set to "PLOT". The fourth parameter represents the title for the x_axis. Default is set to "X". The fifth parameter represents the title for the y_axis. Default is set to "Y". Programmer: Sasan H. Ardalan Date: June 18, 1990 Modified: Sasan Ardalan, Added Dynamic Capability */ |
---|