num2cell_mex.c

A num2cell routine which is a little faster than matlabs m code
81 Downloads
Updated 3 Feb 2015

View License

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 (2024). num2cell_mex.c (https://www.mathworks.com/matlabcentral/fileexchange/49517-num2cell_mex-c), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Logical in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0