num2cell_mex.c

A num2cell routine which is a little faster than matlabs m code

You are now following this Submission

This is a c routine I made to improve the speed of the num2cell routine.
It operates in a similar fashion to the .m code. However, it only accepts the single input. I.e. it does not accept the 'dim' variable which Matlab's routine does. It's a cut and dry routine.
It accepts a numerical array (technically of any dimension or size ... but will output it as a single col vector) and outputs a column oriented cell array.

Example :

a = 1:4;
num2cell_mex(a)

ans =

[ 1]
[ 2]
[ 3]
[ 4]

It's a little faster than the Matlab routine ... no major gains here.

Cite As

Christopher Harris (2026). num2cell_mex.c (https://www.mathworks.com/matlabcentral/fileexchange/49517-num2cell_mex-c), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0