Englab Toolboxes




General Description

A "toolbox" is a group of functions that have common usage, or generally correspond to one scientific field. Englab contains two types of toolboxes: the static and the dynamic ones. The static toolboxes are included in the basic englab's package, and they contain basic mathematical functions. On the contrary, dynamic toolboxes are given separately from the basic Englab's installation. So, in order to be installed by the user, he (she) must download and install them separately. We choose to give the dynamic toolboxes separately, because they have dependencies over other open source libraries, libraries that user must have installed in his system.

Dynamic toolboxes

Englab's dynamic toolboxes are the following:

CImg toolbox

"Cimg" toolbox contains basic functions for importing, exporting and manipulating 2-dimensional images.
Dependencies: CImg toolbox was implemented with the help of the open-source libraries CImg and ImageMagick. User must have these two libraries installed to his system in order to install and use the CImg library.
Note:
: Some function's descriptions of the CImg's toolbox, are copied from the CImg manual.
Note:
: If an additional argument (whatever that is; proposed 0 or 1) is denoted in any of the toolbox functions, the result of the function will appear in the bottom left corner of the EnglabGUI. Exceptions are the functions: savep, saveg, resize, resizeg, showp, showg.
CImg's functions are the following, presented with alphabetical order:

addnoise

addnoiseg

blur

blurg

crop

cropg

cutimg

cutimgg

equalhist

equalhistg

loadg

loadp

normal

normalg

quant

quantg

resize

resizeg

rotate

rotateg

saveg

savep

showg

showp

thres

thresg

Plot Toolbox

This toolbox implements various plotting functions. The Plot toolbox uses the MathGL library ans the FLTK tool, which are it's dependencies. Also another dependencie is the library "pthread". The plot functions with alphabetical order are the following:
Note:
The definitions of the functions were taken from the documentation of MathGL v.1.6 and were enriched by the author. Also this documentation is old. The name sof the following functions are changed.

Function areaplot

  • Syntax: areaplot(x)
  • Description: The function draws continuous lines between points Xi and Yi in plane Z=0 and fills the area below the plot line.
  • Input parameters:
    • x must be of dimensions 2xN or Nx2. The first dimension is the X points and the second dimensions is the Y points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 2xN or Nx2.
  • Returns: 1
  • Example:
areaplot.png

Function axial

  • Syntax: axial(x,y,z,[u])
  • Description: The function draws surface which is result of contour plot rotation for the surface specified parametrically {Xi,Yi,Zi}.
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
    • u is an optional argument.It must be an integer number. It indicates the number of contours to be painted equidistantly between Zmin and Zmax. If not denoted the default is 10.
  • Exceptions:
    • hException::hError if input argument's number is not 3 or 4.
    • hException::hError if the three first input argument's dimensions are not the same.
  • Returns: 1
  • Example:
axial.png

Function beltplot

beltplot.png

Function boxs

  • Syntax: boxs(x,y,z)
  • Description: The function draws vertical boxes for surface specified parametrically by {Xi,Yi,Zi}
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
  • Exceptions:
    • hException::hError if input argument's number is not 3.
    • hException::hError if the input argument's dimensions are not the same.
  • Returns: 1
  • Example:
boxs.png

Function contour

  • Syntax: contour(x,y,z,[u])
  • Description: The function draws contour lines for the surface specified parametrically {Xi,Yi,Zi}.
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
    • u is an optional argument.It must be an integer number. It indicates the number of contours to be painted equidistantly between Zmin and Zmax. If not denoted the default is 10.
  • Exceptions:
    • hException::hError if input argument's number is not 3 or 4.
    • hException::hError if the three first input argument's dimensions are not the same.
  • Returns: 1
  • Example:
contour.png

Function contourf

  • Syntax: contourf(x,y,z,[u])
  • Description: The function draws solid (or filled) contours for the surface specified parametrically {Xi,Yi,Zi}.
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
    • u is an optional argument.It must be an integer number. It indicates the number of contours to be painted equidistantly between Zmin and Zmax. If not denoted the default is 10.
  • Exceptions:
    • hException::hError if input argument's number is not 3 or 4.
    • hException::hError if the three first input argument's dimensions are not the same.
  • Returns: 1
  • Example:
contourf.png

Function density

  • Syntax: density(x,y,z)
  • Description: The function draws density plot for surface specified parametrically by {Xi,Yi,Zi}
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
  • Exceptions:
    • hException::hError if input argument's number is not 3.
    • hException::hError if the input argument's dimensions are not the same.
  • Returns: 1
  • Example:
density.png

Function mesh

  • Syntax: mesh(x,y,z)
  • Description: The function draws mesh lines for surface specified parametrically by {Xi,Yi,Zi}
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
  • Exceptions:
    • hException::hError if input argument's number is not 3.
    • hException::hError if the input argument's dimensions are not the same.
  • Returns: 1
  • Example:
mesh.png

Function plot

  • Syntax: plot(x)
  • Description: The function draws continuous lines between points Xi and Yi in plane Z=0. In other words the area below the plot line fets filled with color.
  • Input parameters:
    • x must be of dimensions 2xN or Nx2. The first dimension is the X points and the second dimensions is the Y points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 2xN or Nx2.
  • Returns: 1
  • Example:
plot.png

Function plot3d

plot3d.png

Function prodist

  • Syntax: prodist(dist,m,s)
  • Description: The function draws various probability distributions. Since now the gauss probability distribution can be plotted.
  • Input parameters:
    • dist is a unsigned char vector that contains the distribution's name. For now the only valid name is "gauss"
    • m is the mean of the gauss distribution.
    • s is the variance of the gauss distribution.
  • Exceptions:
    • hException::hError if input argument's number is not 3.
  • Returns: 1
  • Example:
gauss.png

Function stem

  • Syntax: stem(x)
  • Description: The function draws vertical lines from points {Xi,Yi} to Y=0.
  • Input parameters:
    • x must be of dimensions 2xN or Nx2. The first dimension is the X points and the second dimensions is the Y points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 2xN or Nx2.
  • Returns: 1
  • Example:
stem.png

Function stem3d

  • Syntax: stem(x)
  • Description: The function draws vertical lines from points {Xi,Yi,Zi} to Z=0.
  • Input parameters:
    • x must be of dimensions 3xN. The first dimension is the X points, the second dimensions is the Y points, and the third the Z points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 3xN.
  • Returns: 1
  • Example:
stem3d.png

Function stepplot

  • Syntax: stepplot(x)
  • Description: The function draws continuous stairs for points {Xi,Yi}.
  • Input parameters:
    • x must be of dimensions 2xN or Nx2. The first dimension is the X points and the second dimensions is the Y points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 2xN or Nx2.
  • Returns: 1
  • Example:
step.png

Function stepplot3d

  • Syntax: stepplot3d(x)
  • Description: The function draws continuous stairs for points {Xi,Yi,Zi}.
  • Input parameters:
    • x must be of dimensions 3xN. The first dimension is the X points, the second dimensions is the Y points, and the third the Z points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 3xN.
  • Returns: 1
  • Example:
step3d.png

Function surface

  • Syntax: surface(x,y,z)
  • Description: The function draws surface specified parametrically by {Xi,Yi,Zi}
  • Input parameters:
    • x must be of dimensions MxN
    • y must be of dimensions MxN
    • z must be of dimensions MxN
  • Exceptions:
    • hException::hError if input argument's number is not 3.
    • hException::hError if the input argument's dimensions are not the same.
  • Returns: 1
  • Example:
surface.png

Function torus

  • Syntax: stepplot(x)
  • Description: The function draws surface which is result of curve {r,z} rotation around Z axis.
  • Input parameters:
    • x must be of dimensions 2xN. The first dimension is the R points and the second dimensions is the Z points.
  • Exceptions:
    • hException::hError if input argument's number is not 1.
    • hException::hError if input argument's dimensions number is not 2xN.
  • Returns: 1
  • Example:
torus.png

Plot examples

Example of areaplot:
		delete
		float a[2,100];
		int i;
		for (i=1;i<100;i+=1)
		{
		a[0,i]=i;
		a[1,i]=sin(i*0.1)+cos(0.31*i);
		}
		areaplot(a);
		delete i
		delete ans
		
Example of axial:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i;
		b[i,j]=j;
		c[i,j]=i-j;
		}
		}
		axial(a,b,c,3);
		
Example of beltplot:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=3-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25);
		}
		}
		beltplot(a,b,c);
		
Example of boxs:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=4-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25)-cos(i*0.3)*sin(j*0.4)*0.5;
		}
		}
		boxs(a,b,c);
		
Example of contourf:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=3-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25)+i/3;
		}
		}
		contourf(a,b,c,20);
		
Example of contour:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=3-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25);
		}
		}
		contour(a,b,c,15);
		
Example of density:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=4-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25)-cos(i*0.3)*sin(j*0.4)*0.5;
		}
		}
		density(a,b,c);
		
Example of prodist:
		delete
		prodist("gauss",15,2);
		
Example of prodist:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=3-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25);
		}
		}
		mesh(a,b,c);
		
Example of plot3d:
		delete
		float a[3,1000];
		int i;
		for (i=1;i<1000;i+=1)
		{
		a[0,i]=0.8*sin(0.2*pi*i)*sin(0.1*pi*i);
		a[1,i]=0.8*sin(0.2*pi*i)*cos(0.1*pi*i);
		a[2,i]=cos(i)*sin(i);
		}
		plot3d(a);
		
Example of plot3d:
		delete
		float a[2,100];
		int i;
		for (i=1;i<100;i+=1)
		{
		a[0,i]=i;
		a[1,i]=sin(i*0.1)*cos(i*0.23);
		}
		plot(a);
		delete i
		delete ans
		
Example of stem3d:
		delete
		float a[3,1000];
		int i;
		for (i=1;i<1000;i+=1)
		{
		a[0,i]=0.1*sin(0.04*i);
		a[1,i]=0.1*sqrt(i);
		a[2,i]=cos(0.003*i);
		}
		stem3d(a);
		
Example of stem:
		delete
		float a[2,100];
		int i;
		for (i=1;i<100;i+=1)
		{
		a[0,i]=i;
		a[1,i]=sin(i*0.1);
		}
		stem(a);
		delete i
		delete ans
		
Example of stepplot3d:
		delete
		float a[3,1000];
		int i;
		for (i=1;i<1000;i+=1)
		{
		a[0,i]=0.01*i;
		a[1,i]=0.01*i;
		a[2,i]=cos(0.003*i);
		}
		stepplot3d(a);
		
Example of stepplot:
		delete
		float a[2,100];
		int i;
		for (i=1;i<100;i+=1)
		{
		a[0,i]=i;
		a[1,i]=sin(i*0.1);
		}
		stepplot(a);
		delete i
		delete ans
		
Example of surface:
		delete
		float a[50,50];
		float b[50,50];
		float c[50,50];
		for(i=0;i<50;i++)
		{
		for(j=0;j<50;j++)
		{
		a[i,j]=i-25;
		b[i,j]=j-25;
		c[i,j]=3-0.01*(i-25)*(i-25)-0.01*(j-25)*(j-25)-cos(i*0.3)*sin(j*0.4)*0.5;
		}
		}
		surface(a,b,c);
		
Example of torus:
		delete
		float a[2,10];
		int i;
		for (i=1;i<10;i+=1)
		{
		a[0,i]=cos(i);
		a[1,i]=sin(i);
		}
		torus(a);
		delete i
		delete ans
		

General Description of Analog Filters Toolbox

Analog Filters toolbox contains functions that implement algorithms,such as butterworth,chebychev and inverse chebychev, in order to create curcuits that meet the desired behaviour {low_pass,band_pass,high_pass,bandstop} specified by the user. The inputs of a function is specified later on the documentation. As an output you can have a n-grade curcuit. Each circuit is identified by an ID, by this ID you can interpret the elements following this. ID's are negative integers, so that they can differ from circuit's elements.

inputs_of_Analog_Filters

Description of low pass inputs

Lowpass.jpeg
  1. amax, is the maximum decrement of the signal, in dB, for frequencies ranging from 0 to wp.
  2. amin, is the minimum decrement of the signal, in dB, for frequencies ranging from ws to nan.

Description of band pass inputs

bandpass.jpeg
  1. amin, is the minimum decrement of the signal, in dB, for frequencies ranging from 0 to w3 and w4 to nan.
  2. amax, is the maximum decrement of the signal, in dB, for frequencies ranging from w1 to w.

Description of high pass inputs

highpass.jpeg
  1. amin, is the minimum decrement of the signal, in dB, for frequencies ranging from 0 to ws.
  2. amax, is the maximum decrement of the signal, in dB, for frequencies ranging from wp to nan.

Description of band stop inputs

bandstop.png
  1. amax, is the maximum decrement of the signal, in dB, for frequencies ranging from 0 to w1 and w2 to nan
  2. amin, is the minimum decrement of the signal, in dB, for frequencies ranging from w3 to w4.

circuits_of_Analog_Filters

Description of RC-circuit

Reference ID: -1 Order of values Returned: R,C
RC_1.png

Description of Sallen-Key circuit

Reference ID: -2 Order of values Returned: R1,R2,C1,C2
2.png

Description of circuit Low-pass Notch

Reference ID: -3 Order of values Returned: R1,R2,R3,R4,R5,C1,C2
3.png

Description of Low-pass Notch_2 circuit

Reference ID: -4 Order of values Returned: R1,R2,R3,R4,C1,C2
4.png

Description of Delliyiannis-Fried circuit

Reference ID: -5 Order of values Returned: R1,R2,C1,C2
5.png

Description of Dellyianis-Fred With Gain Reconfiguration Circuit

Reference ID: -51 Order of values Returned: R1(used internally),R2,RA,RB,C1,C2
51.png

Description of band-pass Dellyianis-Fred(with Q consideration) circuit

Reference ID: -6 Order of values Returned: R1(used internally),R2,Ra,Rb,Z22,Z23,C1,C2
6.png

Description of High Pass Notch circuit

Reference ID: -7 Order of values Returned: R1,R2,R3,R4,C
7.png

Description of Low Pass Notch circuit

Reference ID: -8 Order of values Returned: R1,R2,R3,R4,R5,C,C
8.png

Description of Notch circuit

Reference ID: -9 Order of values Returned: R1,R2,R3,R4,C
9.png

Description of High Pass Notch Fried circuit

Reference ID: -10 Order of values Returned: R1,R2,R3,R4,C,C1
10.png

Description of Low Pass Notch Boctor circuit

Reference ID: -11 Order of values Returned: R1,R2,R3,R4,R5,R6,C1,C2
11.png

Description of High Pass Notch Boctor circuit

Reference ID: -12 Order of values Returned: R1,R2,R3,R4,R5,R6,C1,C2
12.png

Description of , another, Low Pass Notch Boctor circuit

Reference ID: -13 Order of values Returned: R1,R2,R3,R4,R5,R6,C1,C2
13.png




Documentation info

Author:
Manos Tsardoulias <etsardou@users.sf.net>, Stratis Gavves <sg_aurelius@sf.net>

Generated on Sun May 31 13:01:51 2009 for EngLab by  doxygen 1.5.5