Like ini file, I basically want to have an easy-to-edit configuration file that can be used to read and distribute the info into matlab objects. I know people would recommend xml but the format is not easy for user to edit. Can anyone have any other way?
I use YAML files all the time for config files with MATLAB applications. I've found them to be easily human-readable and editable, version-controllable, and very straightforward to use.
They have the advantage (over a MATLAB script) of also being widely readable by other languages (Perl, Python, Ruby, Java etc) if the config files also need to be used by other parts of a wider application.
There is a YAML file reader for MATLAB (a wrapper around the free Apache-licensed SnakeYaml Java library) that is publicly available. I've also written my own which I'd be happy to share (it's based on the package I linked to, with slightly less functionality, but quite a bit easier to understand the code and a bit more robust).
Why not use ini files - for simple to edit and read, they can't be beat? They've got problems getting complex, but as long as you're aware of it.
file exchange is your friend: http://www.mathworks.com/matlabcentral/fileexchange/24992-ini-config
You could also use Java Properties files. (I couldn't find anything in file exchange. You'd have to write the interface yourself.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With