Error:Unable to read MAT-file .../slprj/​_jitprj/ji​tEngineAcc​essInfo.ma​t. Not a binary MAT-file. Try load -ASCII to read as text.

18 次查看(过去 30 天)
Enabled source control to GitHub, with LFS. Everything worked from command line. A couple compiles, later, this error stops Simulink.
Error:Unable to read MAT-file .../slprj/_jitprj/jitEngineAccessInfo.mat. Not a binary MAT-file. Try load -ASCII to read as text.
I navigate to this file. It is an ascii file. The contents are:
version https://git-lfs.github.com/spec/v1
oid sha256:3c0869504c7ced452f0c917bcefc09e3ef161894a7530f6e597e99c82a71a91c
size 2434
LFS does seem to have added something to this file, and there is an object ID hash, and a size.
How do I get Simulink compiling again? LFS is needed to track the workspace variables .mat file, as it's 134 MB.
  4 个评论
Benjamin Thompson
Can you provide the files or more information? There is nothing here for the Community to review to reproduce your problem. If using GIT, you may need to configure your GIT settings to treat MAT files as binary rather than text.
Benjamin Thompson
Also you may want to put the slprj folder into the .gitignore list since those are all temporary files and you would not want to be pushing them to a GIT repository.

请先登录,再进行评论。

回答(1 个)

tom krejci
tom krejci 2024-8-2
Check the settings for .mat files. It must be Committed (Pushed) as binary (by default git treats all files as text, and can change the format of the end of the line (CR LF, LF), thereby changing the mat file as well and then it is unreadable).
Example of setting .gitattributes for Matlab files:
* text=auto
# Matlab
*.mat binary
*.fig binary
*.mdl binary diff merge=mlAutoMerge
*.mdlp binary
*.mex* binary
*.mlapp binary
*.mldatx binary
*.mlproj binary
*.mlx binary
Example of setting .gitattributes for LFS (mat file as binary):
# LFS
*.mat filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by