Scripts Index
Related Topics
Popular Trends
Trending Topics
Tools and Utilities Development Tools  

Fast String to Double Conversion

download download home home   report broken
important script information
company name:
Lauri Tamminen
license: Free
minimum requirements: MATLAB 7.11 (2010b)
functional limitations:
Fast String to Double Conversion description


str2doubleq is equivalent to the Matlab built-in str2double function that converts char or cellstr array to appropriate double arrays. The drawback of built-in str2double is that it becomes very slow when the dataset becomes larger.str2doubleq exploits the mex-gateway to use c++ fast string handling capabilities and the std::stringstream properties. The conversion uses same ideas that is used in boost::lexical_castFunction has been tried to program exactly the same as str2double. However it does not currently support complex numbers. This means that it returns NaN values for inputs of type 'd+[+-]id+'Original demand for the function arised from certain market data parsing problems that had to be done in real time. Now Matlab can be as fast as traditional programming languages in these types of string parsing problems.Installation:*Copy the file str2doubleq.cpp somewhere in hard drive. (Example C:Teststr2doubleq.cpp)*Launch Matlab and compile the source file to generate machine dependent binary. If you have not selected a compiler this needs to be done first (run mex -setup in command window).* Source is compiled typing mex (Example mex C:Teststr2doubleq.cpp) *Place the generated str2doubleq.mexw32 (32-bit) or str2doubleq.mexw64 (64-bit) to Matlab's scope (set path- folder group)Now you can use the function in normal matlab fashion. Run the testcases script TestPerformance (included in zip-file)Updates:* Segmentation violation bug fixed.* Fixed a bug when empty array was passed. Now str2doubleq returns NaN instead of empty array. (Consistent with str2double)*Tweaked some extra performance by defining istringstream to be static variable inside the string_to_double helper function. This prevents the overhead that is being built in istringstream constructor in subsequent calls to function.*Made a note in the code about atof usage. Atof is propably the most optimal way to make the conversion. However its behaviour is not the same as built-in str2double (see the notes in source)



Relates:
Script - Command - Window - Setup - Bit - Folder - Matlab - Scope - Included - Normal - Fashion - Groupnow - Str Doubleqmexw - Zipfileupdates - Testperformance - Testcases
Similar scripts
Rob Keyboard (Popularity: ) : This plugin is produced for holding on keyboard when pairing program. You can type "shift ctrl K" to lock intellJ by a Dialog with amusing words. You can lock intellJ by password, with configging password enabled.At first, you should add ...
CIE Coordinate Calculator (Popularity: ) : This software is for calculating the CIE chromaticity co-ordinates of phosphor materials using the photo luminescence data. The software also shows the position of the co-ordinates in chromaticity diagram and expected color of the material. Please note that the color ...
New Dream Coder for Oracle (Popularity: ) : This tool is an code generator for Oracle. While fetching large tables this tool reduces usage of memory. Some features of this tool are, it has new password ecryption, procedure builder, session monitor, SQL templates etc., It increases execution times ...
Foreign Exchange Options (Popularity: ) : fxoptions( S0, X, rd, rf, T, vol, style)Valuation of European and American call and put options on foreign exchange using Garman-Kohlhagen model.European option prices are given by an exact formula (Garman-Kohlhagen).American option prices are approximated using both binomial and trinomial ...
Anti Cut and Paste (Popularity: ) : This utility is helpful for programmers that allows them to search programming language source code's text fragments which have been copied and pasted. Some key features of this tool are, this tool supports both command line and Graphical User Interface ...
AC Protect Standard (Popularity: ) : This utility is used for avoiding hackers from cracking your software using special techniques called anti crack. It works with all windows platforms. Some features of this tool are, this tool compresses ocx, scr, exe, dll and more, dynamic encrypt ...
VBcodePrint (Popularity: ) : This Add-In to Microsoft Visual Basic 6 significantly enhances its source code printing capabilities. You can print any part of your VB project's source code from within the VB's development environment. / You can create and save your own output ...
Bokai Barcode Image generator (Popularity: ) : This tool is used for barcode generator and which has an ActiveX control for printing barcodes. This tool contains more than twenty five barcode types. This tool supports only ActiveX control programs. Users can customize barcode parameters and design of ...
Use Matlab Editor to Write and Run Ansys Program. (Popularity: ) : You don't have to switch your screen between Matlab, Ansys and UltraEdit or PSPad anymore, when you doing FEM-Analysis.You can use MEditor to write your Ansys APDL program and use the excellent feature of MEditor to structure your Code: Cell-Function, ...
VBAcodePrint (Popularity: ) : This add-in enables you to print Microsoft VBA source code in color of your applications across the entire Microsoft Office 2000 suite of applications: Word, Excel, Outlook, Access, PowerPoint, and FrontPage and any other VBA enabled software. / You can ...
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Similar Software
NSF to PST Conversion (Popularity: ) : Fast and quick NSF to PST Conversion is complete by Email Conversion utility which Convert NSF to Outlook safely. Export Notes software converts all items of NSF files like emails, calendars, tasks and contacts to MS Outlook PST file. Advance ...
DBX to Evolution Conversion (Popularity: ) : SoftSpireOCOs DBX to Evolution Conversion utility has made the procedure of migrating bunches of Outlook Express DBX files Evolution a simple, fast and consistent task. Being a simple to use utility and providing simple instructions to users, the DBX to ...
DBX to Entourage Conversion (Popularity: ) : Want to perform DBX to Entourage Conversion in easy and simple process? Take a look at SoftSpireOCOs DBX to MBOX Converter, the best, reliable, fast tool that gives consistent results while converting Outlook Express DBX files to Entourage. Software perfectly ...
EML to MBOX Conversion (Popularity: ) : Don't worry for EML to MBOX Conversion, now PCVARE's EML to MBOX Utility is most resourceful and simple to convert EML messages into MBOX. The Batch EML to MBOX Conversion is also possible with this tool for fast and quick ...
VCF to PST Conversion (Popularity: ) : VCF to PST conversion software is the high-quality excellence tool to convert VCF to PST contacts with fast & secure manner. This tool can easily convert VCF into PST contacts or PST to VCF contacts in bulk which save your ...
PST to EML Conversion Tool (Popularity: ) : If you are going to change company and your pervious company used MS Outlook email client and latest one is Outlook Express and you unable to convert PST files to EML file format then use our latest technology software PST ...
Unistal Lotus Notes to Outlook Conversion (Popularity: ) : Unistal Lotus Notes to Outlook Conversion Software quickly export your Lotus Notes mail file to Microsoft Outlook. Simple and easy to use email conversion tool for nsf to pst file. Software quickly exports Email text, Attachments, Folders and subfolders, Message ...
Nucleus OST to PST Conversion (Popularity: ) : Updated version of the ost to pst software now enables its users to save the recovered files in the file format of their choice; PST, EML or MSG. Now you can easily save the recovered emails in the desired file ...
Docsmartz Word To PDF converter (Popularity: ) : DocSmartz word to PDF Conversion software can convert text documents to PDF files. You can convert to PDF any of your text documents easily with DocSmartz word to PDF Converter. Docsmartz retains the layout, text, and images while converting word ...
Access to XML Conversion Software (Popularity: ) : Best Access to XML Conversion software is advanced and easy to use MDB to XML converter tool that instantly convert access database to XML. Export MDB to XML program can speedily export ms access to xml with all the MS ...
ad


Rate me
supported os
Linux
Mac OSX
Macintosh
Win All, BSD, Solaris
stats
downloads 23
version 1.0
size in Kb 10
popularity   
1702/376909
user rating 5/10
New Scripts
Popular Scripts
Latest Reviews