Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Uber for Massage 2.0
Job Board Software 1.1
RentALL - Airbnb Clone | Built with ReactJS 2.6
VB.Net PDF 2020.6.0
Flowrigami 1.0.0
SentiVeillance SDK Trial 7.3.2020.03.02
Entity Developer 6.8
dbExpress driver for SQLite 4.2
dbForge SQL Complete 6.5
Advanced Amazon Clone App 2.0
Appjetty Delivery Date Manager 1.0.0
The C# Barcode Library 2020.5.0
Chowtro - Online Restaurant Food Ordering Software 1.0
Alvas.Audio.Core 2019.0
Sainsburys Script 1.3.2
Top Code
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
Report About CELP (CELl Processing) 1.0
- required fields

Please enter text on the image
  



CELP (CELl Processing) is a functional programming package for Matlab.
It is often better to use FP instead of loops:
- it's more compact;
- it's more clear.

Matlab has all prerequisites to implement a Lisp-like FP:
- anonymous functions, @'s <-> lambdas;
- FEVAL <-> FUNCALL, EVAL, APPLY;
- cell arrays <-> lists.

Matlab has also several peculiarities:
- cell arrays may have arbitrary dimensions (not only 1d);
- functions may have several outputs
(btw you can use builtin DEAL to implement it in @'s);
- vectors can be converted to cells and back using
NUM2CELL and CELL2MAT.

Currently the package includes
CPAPPLY Analogue of Lisp's APPLY
CPBIND Substitution of argument
CPEVAL Evaluate multioutput function and return outputs in one cell array
CPFILTER Analogue of Lisp's FILTER
CPIF Conditional composition of functions
CPMAP Analogue of Lisp's MAPCAR
CPREDUCE Analogue of Lisp's REDUCE
(use 'help *' for more info and examples).

CPFILTER, CPMAP, CPREDUCE are equivalents of Lisp's routines. The latter
two are implemented in MEXs for speed.

CPIF and CPBIND are used for construction of new functions from
defined. They are implemented with the help of nested functions.

CPAPPLY, CPEVAL deal with multioutput functions. One general limitation of
M-language is that when you write
f(g(x))
only one output of g(x) is substituted into f. Thus you need to use
[y,z] = g(x);
f(y,z)
to substitute all outputs. Using CELP's functions you may code it as
cpapply(@f,cpeval(2,@g,x))

The main disadvantage of CELP is speed - evaluation of anonymous functions
can be quite slow. Thus I do not recommend to use CELP with @'s in
intensive calculations (probably Nathan Thern's TMP_HANDLE may be of help
here - search for it on FEX).

Back