#### 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.

#### 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.

#### 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.

#### 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.

• GUI mode: In order to run the program in GUI mode start it without input arguments, i.e. type "fithill" at the Matlab command prompt.
• command prompt mode:
[fittedParameters,rsquared]=fithill(xdata,ydata,PropName,PropVal1,PropVal2,...)
OR
[fittedParameters,rsquared,fittedN]=fithill(xdata,ydata,PropName,PropVal1,ProbVal2,...)
Output argument 'fittedN' is required if propName 'logconctoplot' is given among the arguments.
• xdata = LOG10 of the drug concentrations (LOG10!!!!!!!)
• ydata = cell numbers or absorbances
• fittedParameters = structure with the following fields:
• fittedParameters.min
• fittedParameters.max
• fittedParameters.kd
• fittedParameters.n
• fittedParameters.minCI
• fittedParameters.maxCI
• fittedParameters.kdCI
• fittedParameters.nCI
• rsquared = goodness of fit
• fittedN = calculated curve using the best fit parameters at the concentrations given in the argument list after 'logconctoplot'

The following parameters are followed by two numbers:

• Parameter names: ic50, ec50, n, min, max
• Value of first parameter: 1 = to fit, 0 = fixed parameter
• Value of second parameter:
- if first parameter is 1, the second parameter specifies the initial value
- if the first parameter is 0, the value specifies the fixed value of the parameter