How to import .mat file in MATLAB?
12 次查看(过去 30 天)
显示 更早的评论
i have been trying to import a data in .mat format and after i select the file, "import wizard" window pops up which is shown below. When i click finish button but it shows a blank window. I am not able to import the .mat file. Can someone help me out? thank you in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1268480/image.jpeg)
0 个评论
采纳的回答
Kunal Kandhari
2023-1-19
Hi Bidyarani,
You can make use of load function to read the .mat file into MATLAB.
Below is the sample code for that:
filename = 'test.mat';
load(filename)
Hope this helps!
3 个评论
Kunal Kandhari
2023-1-20
Can you please try this out:
In command window, run this command:
clear
it will clear your workspace and then run the following code:
myVars = {'d_users','cellular_users','pathloss_users','pathloss_cellular'};
load(filename,myVars{:})
disp(cellular_users)
And let me know the output
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!