readParam( fileName, paramName )
To change the delimiter, you must change the '#' on line 14 to any other character.
% This function will read a file for the requested parameter. This will
% be useful when you forget how your code works and need to tune it
% written by Kevin Sheridan, for use under GPLv3
% INSTRUCTIONS:
% use: value = readParam('fileName.txt', 'parameterName')
% A PARAMETER FILE EXAMPLE:
% param1 #1.3567# unit/explanation
% param2 #-2.7896# m/s (the speed of object X)
% ...
Cite As
Kevin Sheridan (2025). readParam( fileName, paramName ) (https://www.mathworks.com/matlabcentral/fileexchange/58283-readparam-filename-paramname), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
