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.

9 ビュー (過去 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
Benjamin Thompson 2024 年 4 月 4 日
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
Benjamin Thompson 2024 年 4 月 4 日
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 Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by