Load .mat file from anyfolder

조회 수: 7 (최근 30일)
rihab
rihab 2015년 12월 8일
편집: Mohammad Abouali 2015년 12월 8일
I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?

채택된 답변

Mohammad Abouali
Mohammad Abouali 2015년 12월 8일
편집: Mohammad Abouali 2015년 12월 8일
load C:\myFolder\mySubFolder\myMatFile.mat
or
variableName= 'myVarName';
matfilePath = 'C:\myFolder\mySubFolder\myMatFile.mat';
data = load(matfilePath);
% to access the variable
data.(variableName);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by