File Exchange

image thumbnail

INI Config

version (9.32 KB) by Evgeny Pr
The class for working with configurations of settings and INI-files.


Updated 22 Mar 2010

View Version History

View License

This class allows you to create configurations of settings, and to manage them.
The structure of the storage settings is similar to the structure of the storage the settings in the INI-file format.
The class allows you to import settings from the INI-file and to export the settings in INI-file.
Can be used for reading/writing data in the INI-file and managing settings of application.

Cite As

Evgeny Pr (2021). INI Config (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)


I loved the library and made a humble contribution.

I added the capability to parse the strings 'inf', '-inf' or +'inf' as numeric infinity. I suggest you to implement that change too. I did not make it optional although it would be a good idea.
Below is the altered code (just the 'ParseValue' function).

Best regards,

function value = ParseValue(value)
%ParseValue - classify the data types and convert them

% ����������, �������� �� ������ value �� �������� �������
start_idx = regexp(value, '[^\.\s-+,0-9ij]', 'once');

if ~isempty(start_idx)
if all(~strcmpi(value, {'inf', '-inf', '+inf'})) % condition added to allow inifnity to be written as 'inf' on the ini file value
warning('inf value detected, parsed as numeric infinity, not as a string."');

num = StringToNumeric(value);

if ~isnan(num)
value = num;

Michael Critchfield

Great function! But am I doing it wrong or can SetValues not set ‘String‘?

Du Xiao

It is usefull!

Liu Yang

Pedro Arevalo

huachao mao

Works perfectly.

Nick Manov

Really nice tool. I would love to be able to use it for cell arrays though.



working great!!

Matthias Pospiech

It works as expected, but I would prefer a better documentation with realistic examples.

richard o brien .

Is there a way to write comments in the ini file (i mean from the software with the tools available, not with fwrite..)?


very well

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

Community Treasure Hunt

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

Start Hunting!