Importing data from a .mat file into the Sensitivity Analyzer App on Simulink
2 views (last 30 days)
Show older comments
I have a .mat file that has data that I would like to import into the Sensitivity Analyzer app on simulink to perform additional statistical anaysis like Standardized Regression, Correlation, generate Tornado plots. However, when I try to Open a Session from a file, I get the following error.
The 'filename.mat' MAT-file does not contain valid session data.
How do I fix this problem? I even tried defining the variable separately by first importing the data a readtable function but, still getting the same error.
0 Comments
Answers (1)
Sugandhi
on 9 Jun 2023
Hi,
I understand that you are facing issue in importing .mat file into the Sensitivity Analyzer app on Simulink to perform additional statistical analysis.
From the error you shared, I understand that the file you are trying to import into the Sensitivity Analyzer app on Simulink is not in the proper format. To fix this issue, make sure that the file contains valid session data that is readable by the app.
Few possible work arounds are:
1. Check the structure of the MAT-file: Make sure that the MAT-file is in the proper format, and it contains the expected data. You can do this by opening it with MATLAB and using the 'whos' command to get information on the variables in the file.
2. Check the version compatibility of MATLAB: Ensure you are using a MATLAB version that matches or is compatible with the Sensitivity Analyzer app. The app may not be compatible with the version of MATLAB used for generating the mat file.
3. Use the 'load' function to import data: Instead of using the "Open a Session from a File" function in the app, use the 'load' function in MATLAB to import the .mat file into a variable in the MATLAB workspace. Once you have the data in a variable, you can use the Sensitivity Analyzer app with the variable.
4. Check the format of the data in the MAT-file: Ensure the data in the file is saved in a format that the Sensitivity Analyzer app can read. If necessary, convert the data to the appropriate format before saving it to a MAT-file.
0 Comments
See Also
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!