フィルターのクリア

How to open a .mat file in Matlab

1,062 ビュー (過去 30 日間)
Priya
Priya 2014 年 3 月 27 日
コメント済み: Areej Nayab 2018 年 9 月 25 日
Hi,
I'm trying to open a .mat file in Matlab, but am unble to do it. I followed the instructions from this link below,
After step 6, I have a separate folder for 'R2012B', now what should I select from this folder.Please let me know your suggestions.
  4 件のコメント
Priya
Priya 2014 年 3 月 27 日
Thanks.
Areej Nayab
Areej Nayab 2018 年 9 月 25 日
a=load("1.mat") imshow(a) this is the shortest possible way, and 1 is the name of the image. you will type according to your .mat file.

サインインしてコメントする。

回答 (3 件)

Image Analyst
Image Analyst 2014 年 3 月 27 日
Spcify the full path of your file
folder = 'c:\whatever........'; % You specify this!
fullMatFileName = fullfile(folder, 'wheel_rail_AW.mat')
if ~exist(fullMatFileName, 'file')
message = sprintf('%s does not exist', fullMatFileName);
uiwait(warndlg(message));
else
s = load(fullMatFileName);
end
  1 件のコメント
Priya
Priya 2014 年 3 月 27 日
Thank you.

サインインしてコメントする。


smriti garg
smriti garg 2015 年 3 月 28 日
編集済み: smriti garg 2015 年 3 月 28 日
I just got a more user-friendly way of selecting a *.mat file, so thought to share:
[fileName,filePath] = uigetfile('*', 'Select data file', '.');
if filePath==0, error('None selected!');
end
U = load( fullfile(filePath,fileName) );
enjoy!!
  1 件のコメント
Ramesh Paudyal
Ramesh Paudyal 2017 年 1 月 5 日
great

サインインしてコメントする。


abdelilah mbarek
abdelilah mbarek 2018 年 6 月 9 日
use :
whos -file fileName.mat
fileName.mat should be in matlab path
  1 件のコメント
Walter Roberson
Walter Roberson 2018 年 6 月 9 日
That could tell you which variables are in the file, but does not load the data from the file.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by