Load .mat file from anyfolder
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
I have to load .mat file from a folder in my workspace. Can anyone tell me how to do so?
댓글 수: 0
채택된 답변
  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
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File 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!

