Load .mat-file in Web App Server
显示 更早的评论
Hi folks,
I have an App running on Web App Server. What I'm trying to do is read in a .mat-file and set some values depending on the file.
My aim is to get to a point where a user can make some changes on the GUI/app then save the entered values to a custom .mat-file and load them back into the app to a later point in time. I hope my problem is okay to understand.
If I run my App out of Matlab save/load works fine. But on the deployed app on the server it doesn't.
I get the following messages in the log of the server:
% saveload.mat is uploaded successfully
% Error using load
% Unable to read file 'saveload.mat'. No such file or directory.
What am I doing wrong?
5 个评论
Mario Malic
2020-10-30
saveload.mat probably is not on the search path of Web App Server. Find the folder where uploaded files are saved to.
Dominik Müller
2020-10-30
编辑:Dominik Müller
2020-10-30
Mario Malic
2020-10-30
Are you able go identify the session name/instance? If yes, you can use genpath and/or addpath, otherwise you can add all folders within the session folder to the search path, but this wouldn't be a good solution.
Dominik Müller
2020-10-30
Mario Malic
2020-10-30
编辑:Mario Malic
2020-10-30
Great! Also, don't use cd, rather supply full or relative path to load function. It is slow and can cause issues.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Web App Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!