File Exchange

image thumbnail

INIFILE

version 1.2.0.0 (9.3 KB) by Primoz Cermelj
INI file reading and writing.

13 Downloads

Updated 20 Jun 2009

View License

Utility to create/read/write entries into/from ascii ini file (strings, scalars and numeric matrices). Multiple keys can be read/written AT ONCE.
See inifile.m for additional information.

Cite As

Primoz Cermelj (2019). INIFILE (https://www.mathworks.com/matlabcentral/fileexchange/2976-inifile), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

Mr stone

One suggestion: Add a model to read an entire section

chen gang

it's useful for me

Tyler Cumby

I noticed a minor bug in the 'readall' option where in the keys return value, the last subsection is repeated for subsequent empty subsection names. My fix was to add
if ~isempty(subsecStr)
subsecStr = '';
end

in readallkeys(filename) under the if statement 'if status == 1' where new section names are incorporated.

Tyler Cumby

Danielle

totally awesome!

One suggestion: Add an option to preserve the case of keys. That way it would be easy to create a broader range of Matlab structures dynamically.

Really great. Perfect to make and read easily config files.

Danila

Useful code

Great work,
it is really useful,
Thanks for your professional efforts...

Danila

Very usefull code.

Andrei Ninu

Jonathan Archer

The code could use a little tidying up. It could be more readable if limited to 75 columns.

Prakash Hanagud

Thanks

Benton Lau

Very useful. No problem in Matlab v6.5.

Elmer Tom

Useful... Using it in MATLAB 5.2 with no problems so far...

Updates

1.2.0.0

License update

1.1.0.0

license update

1.0.0.0

Fix: When in read mode and a certain key is found but the value is empty, the default value will be used instead.

update

Update ('readall' option added)

Update

Bug removed

Minor changes

Comment lines are now detected

Numeric matrices can be read/written; a bug related to read operation and default value has been removed

new version - conversion to/from integer and double is now supported

minor update and bug fixes

?

The proper file uploaded

Complete rewrite - a new concept - multiple keys can now be read, written, or deleted ALL AT ONCE which makes this function much faster.

Update; no additional functions needed anymore

Update

Screenshot added

Screenshot added

Update;

Update - a major refinement and 'deletekey' option added.

Update; free code (M-file)

Update; (m-file instead of p-file)

MATLAB Release Compatibility
Created with R13SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux