# Extension of Igor Pro <- Excel Functions

The recent postings about including a Python module and the project started to incorporate MATLAB functions got me thinking about something else that might also help better attract users - having an easier way to use some familiar core Excel (spreadsheet) commands. For example and especially ...

excel#ave(wave or comma separated set of numbers)

excel#stdev(wave or comma separated set of numbers)

excel#slope(wave1,wave2)

excel#intercept(wave1,wave2)

excel#linest(wave1,wave2,flag1,flag2)

I suggest this for anyone having the time and wanting to sponsor a potentially useful package.
It seems like mean() and variance() are pretty close to your first two. Do you really need a function that takes a list of numbers?

What do slope() and intercept() do? Do they do a line fit and return the slope and intercept determined by the fit? And I guess wave1 and wave2 are Y and X of an XY pair?

And what is linest?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
It seems like mean() and variance() are pretty close to your first two. Do you really need a function that takes a list of numbers?

What do slope() and intercept() do? Do they do a line fit and return the slope and intercept determined by the fit? And I guess wave1 and wave2 are Y and X of an XY pair?

And what is linest?

The mean and variance likely do the same as ave and stdev. Having the same syntax as in Excel is what seems to me to be important, even if preceded by the excel# directive. Matter of habit for some that excel#ave(...) is easier to remember than mean(...). Also, many functions in excel take "lists" of numbers. That makes things a bit trickier in Igor to do a wave or list.

excel#slope returns the slope of a linear regression fit and excel#intercept returns the intercept.

excel#linest returns the LINE STATISTICS for a linear regression fit, including the slope, intercept, and their standard deviations. The two flags control in one case whether the line is forced through (0,0) and in the other whether or not to return the standard deviations. The values are returned in a 4x4 "block" of cells in the spreadsheet.

Yes, the wave1, wave2 are x,y pairs (I never remember the order anymore without explicitly looking).

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville