Code covered by the BSD License  

Highlights from
toSingle

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 1.24 KB File ID: #40444

toSingle

by

 

Converts all numeric variables in the workspace, or optionally all doubles only, to single precision

| Watch this File

File Information
Description

% TOSINGLE - toSingle(doublesOnly)
%
% Converts all numerical variables in the calling
% workspace to single precision
%
% If doublesOnly is nonzero, then it converts only
% the doubles in the calling workspace to singles
%

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
21 Feb 2013 Jan Simon

The dynamic change of the types will reduce the memory footprint of a function, but it is very likely that the processing time will grow: Matlab's JIT acceleration is impeded by such dynamic changes. Some functions need 100 times longer afterwards compared to a explicit and direct creation of the variables in the wanted class.

Contact us