load korea5c Matlab don't work and display ‘’The function or variable 'korea5c' is not recognized.‘’

조회 수: 10 (최근 30일)
load korea5c 不能正常运行

답변 (1개)

Abhishek Kumar Singh
Abhishek Kumar Singh 2024년 11월 4일
Hi @huili,
It's likely that the file path hasn't been added, or the file is missing, which is why MATLAB cannot recognize the MAT-file.
To resolve this:
  1. Check Directory: Ensure korea5c.mat is in your current directory or on the MATLAB path.
  2. Set Path: Use addpath('path_to_directory') to add the directory containing the MAT-file.
  3. Load File: Use load('korea5c.mat') to load the dataset.
  4. Verify File: Confirm the file exists.
  5. Use Full Path: Try load('C:\full_path\korea5c.mat') if needed.
I have attached the koreas5c.mat file in the attachments from an example from this documentation page MATLAB.
You can download it, place it in an added path and try again.
info = matfile('korea5c.mat')
info =
matlab.io.MatFile Properties: Properties.Source: '/users/mss.system.w469v/korea5c.mat' Properties.Writable: false description: [2x64 char] korea5c: [180x240 double] korea5cR: [1x1 map.rasterref.GeographicCellsReference] source: [2x76 char]
Hope this helps!

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by