sm4tomatlab()
sm4tomatlab.m reads all the .sm4 files in the current directory and converts and saves them as .mat structures. The format is dictated by the sm4reader.m file.
For files which are not convertible due to lack of data or which are not accounted for yet (e.g. originally AFM and PLL channels were not read) are skipped and output as an array of cells containing their file names (skippedFiles).
Note that if the file name contains period characters (.), before they are saved the name will be changed to underscores (_) to prevent issues from occurring in MATLAB.
Further information on SM4TOMATLAB and sm4reader can be found at:
http://unh2d.weebly.com/using-sm4-files-in-matlab.html
http://unh2d.weebly.com/sm4readerm-and-the-mat-file-format.html
The program was developed in Shawna Hollen's 2D Materials lab at UNH (http://unh2d.weebly.com/).
Cite As
Jason Moscatello (2024). sm4tomatlab() (https://www.mathworks.com/matlabcentral/fileexchange/62562-sm4tomatlab), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: sm4reader(fileID)
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.