Issue loading mat file in different MATLAB versions
9 次查看(过去 30 天)
显示 更早的评论
I have a mat file which contains userInputs that has 24 fileds. when i load in MATLAB 2023b i gives struct field userInput.SignalSourceType as empty but when i load same file in MATLAB 2024b i givest struct field userInput.SignalSourceType as 1. I am attaching screenshot for reference. The difference cause further issues and errors in my code and i need to run it on 2024b for certain requirments. If anyone have resolution please help me out.
0 个评论
回答(1 个)
Rik
2025-1-21
Without the mat file, it is impossible to tell what type of object gets loaded in R2023b. It looks as if it gets loaded as an empty double array in R2024b.
You need to call class(userInput.SignalSourceType) and make sure that is supported in your copy of R2024b as well.
4 个评论
Rik
2025-1-22
I'm on mobile so I can't run code now.
As Walter clarified, it seems your copy of 23b supports a class that your copy of 24b doesn't. Calling the class function will not solve the problem, but it will tell you the class name.
So what was the result? And how did you make sure that class is also supported in your copy of 24b?
Walter Roberson
2025-1-22
When I load in R2023b I get
SignalSourceType: Captured
which is an enumeration. It is not immediately clear why the enumeration would not be considered properly in later versions.
I also get the message
Warning: Could not find appropriate function on path loading function handle \\fs-58-ah\vmgr$\home08\kkearney\Documents\MATLAB\Examples\comm-ex67942163\helperAISController.m>generateCodeCallback
but I get that for both R2023b and R2025a
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!