View Full Version : Summary - Programming Languages

02-03-1998, 02:59 AM
Hello all,

This is the summary of resposes to my inquiry regarding programming languages
suitable for motion analysis. I was nicely surprised for the number and
variety of oppinions. Personally, I am working with Visual Basic, C++ and
Matlab - each of them has their own good (and bad) features as one may see next.
If someone wants to share more information, please write me.

Thank you indeed to everyone who has replied - and good software development!

My Original Message:

Dear all,

I am looking forward choosing a standard programming
language/evironment for the development of the motion
analysis software to be used in our laboratory. It must allows the following:

- fast development of Windows 95/NT applications
- easy selection/access to data files
- easy generation of graphical plots of data (e.g. kinematic)
- implementation of geometric and DSP algorithms (e.g. filtering)
- access to external databases (e.g. paradox)

I am currently considering Microsoft Visual Basic and Visual C++, Borland
C++ Builder, LabWindows/CVI. I am currently using Borland C++ 4.x.

I would like to ask for your experience and suggestions. As usually I will
post a summary of responses. Thank you in advance.

Jose Haroldo de A. Cavalcante
SARAH Hospital

SMHS 501-cj. A

e-mail: haroldo@lab01.sarah.br
phone: 55-61-319-1440
fax: 55-61-319-1448

From: Edmund Cramp

I saw your message and thought I'd give you my opinions. Both Visual Basic
and Visual C++ are fine languages and should fit into your laboratory
environment. However, given that you're in Brasil the major point that I
would make is - who has local support? I think that the issue of which
language to use is relatively minor compared to the question of who will
help you when the function or procedure that you wrote does not work - even
after staring at it for a week!

If you want to see what can be done in Visual C++ then you might want to
download some of the programs from our web site - everything is 32-bit
Windows 95/NT compatible and written in C++.

Edmund Cramp - Motion Lab Systems, Inc.
Email: eac@emgsrus.com

From: "Joseph J. Sarver"

Dear Mr. Cavalcante,

I have been working with MATLAB for the past 3 years and have found it a most
excelent package. In addition to its various resourses you can purchase
additional "toolboxes" for different tasks. Such as the Real Time, toolbox for
recording data or controling a device real-time. There are also statistical
toolboxes, symbolic math and of course DSP.

The langauge is a simplified version of C and I found it relatively easy to move
from C to MATLAB. In addition the latest version (5), has a debugging editor as
well as structures and C++ class definitions etc.. In a few weeks you can
comfortably make the transfer from C to MATLAB. Finally the latest version
offers tools for designing graphic user interfaces relatively easily.

As you can tell I am smitten with MATLAB, but it does have the rather large
disadvantage of being costly, although if you search their web site
(www.mathworks.com) you can get a feel for not only the cost for your specific
application, but also far more detail than I have provided here.

Good luck,

Joseph Sarver

From: "Sharon Dixon"

I have found Matlab useful for this purpose.

Best wishes,


Dr Sharon Dixon
Research Associate
Department of Civil Engineering
University Park

Tel: 0115 951 3889
Fax: 0115 951 3898

E-mail: sharon.dixon@nottingham.ac.uk

From: "John P. Peach"


I have spent a lot of time developing windows based software for motion
analysis. What I find works really well is that you use Visual Basic to develop
the user interface, read/write files, plot things on the screen and use DLL files
written in C++ (Borland is better then MS Visual C++) to develop all the math
components of the program. Visual Basic is good for the interface stuff but is
really slow when it comes to number crunching and looping.


From: Tim Niiler

We use LabVIEW or PV-Wave for all of this. Most in the lab prefer LabVIEW
because of its rapid learning curve and the above features. PV-Wave has many of
the same benefits, but it is less intuitive (more like C). Experienced
programmers may like the second more than the first, but both are almost equally
good. The problem is that both are over $1000 for a license.

Cheers, and good luck.
Tim Niiler

Biomechanics and Movement Sciences
University of Delaware Sports Science Lab
Phone: (302)-831-6752

From: "J. Houck"

Please post the reponses. We are trying to use visual basic which appears
to have the capabilities of the list of needs you have. But we are
novices at best.

Jeff Houck, PT
Program in Physical Therapy
University of Iowa
2600 Steindler Bldg.
Iowa City, IA 52246
Phone - (319) 335 - 9808

From: "B.J. Fregly"


I work for a software company, and my co-workers who develop on
Windows NT really like using Microsoft Visual C++. However, I
don't think it has anything special for creating graphical plots
(you would have to write your own programs for doing this).
However, as you probably know, C++ is extremely flexible, which
makes it a great language for implementing even complex algorithms
in a clean manner.

B.J. Fregly

Benjamin J. Fregly, Ph.D.
Research and Development Engineer
Pro/MECHANICA MOTION Analysis Technology
Parametric Technology Corporation
2590 North First Street, Suite 200
San Jose, CA 95131
Tel: 408/953-8650
E-mail: bj@sj.ptc.com

From: Oyvind Stavdahl

Personally I am using MATLAB, which seems to be increasingly popular for
biomechanical applications.

- MATLAB is in itself a Windows application, and can extremely easily be
extended with user defined functions written i MATLAB's vector/matrix oriented
high-level language. The vector orientation means very compact code whenever
the problem at hand can be "vectorized" (which is definitely the case for
signal processing and analysis). It comes with library functions for creating
a graphical user interface, so the user functions "look like" standalone
Windows applications.
- MATLAB has its own binary file format, but it can also write and read ASCII
tables. Additionally, the MATLAB language comprises C-like functions like
fscanf, fprintf etc. for reading or writing any file format.
- MATLAB comes with lots of standard library functions, including very powerful
tools for graphical plots.
- MATLAB's toolboxes includes a library of signal processing funcitons, which implies
that filtering etc. can be done with only a few lines of code. The signal
processing toolbox includes most common (and uncommon) filters and other DSP
- Access to external programs can be implemented by expot/import of database files
(e.g. ascii tables). MATLAB's "external interface" functions also allows for
utilisation of Windows' dynamic data exchange functionality.
- MATLAB also can be linked to real-time hardware so that data acquisition and even
hardware-in-the-loop control systems can be implemented from this same environment.

The only drawback I can clearly see is the cost. If you can afford it, it's worth it!

See http://www.mathworks.com for more info.

Good luck!
Oyvind Stavdahl (Siv.ing., Dr.ing. student)
Department of Engineering Cybernetics
NTNU, The Norwegian University of
Science and Technology Direct line: +47 73 59 43 77
O. Bragstads plass 8 Switchboard: +47 73 59 43 76
N-7034 TRONDHEIM Fax: +47 73 59 43 99
NORWAY Email: Oyvind.Stavdahl@itk.ntnu.no

From: "D. Maruszewski"

I am on the verge of launching a similar effort at my workplace, and have
the same questions. I would greatly appreciate it if you could forward or
summarize your responses so that I might have some guidance when I begin.
Thanks so much.
(p.s. Have you not considered Java?; why/why not?)

Diane Nell

From: "Rahman Davoodi"

Dear Jose,

I suggest using Labwindows/CVI. I have been using it for three years and I
am happy with this program. It lets you develop Windows/95 applications,
access data files easily, generate graphs and strip charts and has a good
collection of data analysis functions if you buy the advanced analysis
option. You can have DDE with Excel but I haven't used it.

My reasons for using Labwindows/CVI are:
- Developing windows programs without knowing anything about windows
- Good user interface for changing parameters of the simulation program.
- A good collection of useful functions that are not available in Borland C,
visual C++ etc.
- You can not only program in C but also import C code from other softwares.
For example, I use a software to produce C code of equations of motion for
my model and then import it to Labwindows/CVI. Many softwares now produce C
codes for implementation in other programs.
- By provided graphical functions the motion can be visualized while the
program is running such as stick figure animation. The latest version has
even more sophisticated graphical functions.

Good Lock - Rahman Davoodi

__________________________________________________ _________________________
Rahman Davoodi
Dept. of Biomedical Engineering, 10-102 Clinical Science Bldg.
Univ. of Alberta, Edmonton, Canada T6G 2G3
Phone: (403)492-0723 Fax: (403)492-8259
Email: Rahman.Davoodi@ualberta.ca
__________________________________________________ _________________________

From: David Collins

Dear Dr. Cavalcante,

Regarding choice of programming language, I have had reasonable success
with Microsoft Visual C++ 4.0 for Win95 (previously I have used Borland
for dos and Semantic for mac, but haven't tried other Win95 programs for
comparison). I have only programmed for my own data crunching, so I
don't have useful interface code. I use a dense and uncommented style,
but if you don't get many other responses (which I doubt will be the
case), I would be happy to share the code I have for calculating phase
angles (position/velocity space) and probability distributions (which I
use to estimate basic parameters from a presumed Potential model using
the Fokker-Planck equation; Collins & Turvey, 1997, A stochastic
analysis of superposed rhythmic synergies. Human Movement Science 16:
33-80) from Cartesian coordinate time series data of human bimanual

Good luck, and I will look forward to the summary,

Center for the Ecological Study of Perception and Action
University of Connecticut, Storrs, CT 06269
email: drc93001@uconnvm.uconn.edu
Tel: (860) 486-2212 (W), (860) 429-6343 (H)
Fax: (860) 486-2760

From: Giovanni LEGNANI

I sugget you having a look at the ISB home page where some software is available


From: "Ian Kremenic"

The best all-around language that I have used (and by far the best
program of any type I have ever used) is MATLAB.

Does all that. It's a high-level lenaguage that also lets you use
many programming constructs similar to C. The latest version also
lets one do object-oriented programming. It generates beautiful
presentation-quality plots. Be sure to get the Signal Processing
Toolbox add-on, and most of your DSP work will be done for you. I've
not had occasion to access databases, but there is an API for writing
C or Fortran code to interface with MATLAB. The most recent version
also has tools for easier GUI development (a la Visual Basic).

A big bonus for me is that, unlike most software that claims to work
the same across any supported platform, MATLAB actually does. Write
your functions or scripts anywhere, and run them on any computer with
that same version of MATLAB. It runs on Win 95/NT, Mac, and most
flavors of UNIX (including Linux!) Hell, I know they used to even
sell a Cray version.


Ian Kremenic, M.Eng. ian@nismat.org
Research Assistant/Network Admin. http://www.nismat.org
Nicholas Institute for Sports Medicine and Athletic Trauma

From: Barry Munkasy

I would recomment that you consider National Instrument's Labview
programming language. I think you will find that it meets your
requirements and will provide you with other advantages such as the ability
to be integrated with an A/D collection system.