Welcome to the web page 
of Peter Nagy

Experience and experiments with Matlab

What a "user-friendly" application! This was my first impression when I first installed Matlab on my computer and it started up with a screen with a command prompt and basically nothing else. But I gradually began to appreciate the flexibility and power of data analysis and the relative ease of programming of Matlab. I wrote Matlab code for fun and for developing applications for myself or for my colleagues. Below, you can find  a selection of the utilities I developed.

regressContourPlot

You can fit a regression line on 2D histogram data, i.e. if you already don't have the original data set containing two measurements for each data point.

Syntax: [r,slope,intercept]=regressContourPlot(twoDHist,xScale,yScale)

Help is available by typing "help regressContourPlot" at the Matlab command prompt.

Download: regressContourPlot.m

createTrend

A trend line can be created from a data set containing two measurements for each data point. In order to create a trend line the X range is divided into the specified number of bins and the mean of the Y variable in each bin is calculated.

Syntax:

  • createTrend(XYData)
  • [trendline,binsX. freq]= createTrend(XYData,XMin,XMax,NumBins)

Help is available by typing "help createTrend" at the Matlab command prompt.

Download: createTrend.m

createContour

You can generate a 2D histogram (contour plot) interactively from a dataset containing two measurements for each data point.

Syntax: createContour(XYData)

Help is available by typing " help createContour" at the Matlab command prompt.

Download: createContour.m

Fitting the Hill equation to data points: fithill

The program fits the Hill equation to measurement data. The Hill equation has the following forms depending on whether IC50 or EC50 is fitted on concentrations on a linear or logarithmic scale:

The program can be run in GUI mode or command-prompt mode.

The following parameters are followed by two numbers:

Parameter name Value of first parameter Value of second parameter
ic50  1=to fit, 0=fixed parameter if first parameter is 1 -> initial value
if first parameter is 0 -> value of the fixed parameter
ec50 same as above same as above
n same as above same as above
min same as above same as above
max same as above same as above

If 'ec50' and 'ic50' is not followed by a numeric parameter, it only specifies whether a decreasing or increasing curve is to be fitted.

The following parameters are followed by one number or variable:

The following parameters aren't followed by anything:

The program upgrades itself.

Download: fithill.p