Rank: 7150 based on 12 downloads (last 30 days) and 1 file submitted
photo

Bastian Binder

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Bastian Binder
Updated   File Tags Downloads
(last 30 days)
Comments Rating
06 Mar 2012 array2string.zip simple function that converts a cell array to a string. Author: Bastian Binder cell array, string, conversion 12 2
  • 3.0
3.0 | 1 rating
Comments and Ratings on Bastian Binder's Files View all
Updated File Comment by Comments Rating
09 Mar 2012 array2string.zip simple function that converts a cell array to a string. Author: Bastian Binder Jan Simon

You assume that the input is a 2D cell matrix, but this is not stated in the help section.
Creating the cell temp without a pre-allocation is slow. Better:
temp=reshape(array_loc', 1, []);
Checking for "length(temp)>1" in the IF condition is not needed: If temp is empty, the FOR loop body is not reached.
Please add to the help section, that SINGLE, LOGICAL, STRUCT and (U)INT8/16/32/64 data are ignored without a warning.
I'd expect that strings are enclosed in quotes. Otherwise the EVALing might lead to unexpected results. CHAR matrices let the function stop with an error.

01 Mar 2012 array2string.zip simple function that converts a cell array to a string. Author: Bastian Binder Rob Aberg

If you have Simulink installed, you can also use the built-in Simulink.saveVars command to save MATLAB variables including cell arrays, structs, and objects as executable MATLAB code in .m files. See the doc for more information: http://www.mathworks.com/help/toolbox/simulink/slref/simulink.savevars.html

Contact us