How to display a 256x256 image from .mat file?

조회 수: 7 (최근 30일)
Aditya Shah
Aditya Shah 2021년 12월 1일
댓글: Aditya Shah 2021년 12월 1일
I have a 256x256 .mat file ''GrayScaleMRI.mat". I want to display it as an image but I am unble to do so. Here's what I tried to do. But it is showing error. Can anyone help me as to how I can do it?
a = load('GrayScaleMRI.mat');
imshow('GrayScaleMRI.mat');

채택된 답변

DGM
DGM 2021년 12월 1일
Almost had it.
S = load('GrayScaleMRI.mat');
imshow(S.GrayScaleMRI)
When using the functional syntax for load(), the output argument is a struct containing the variables in the .mat file.
  댓글 수: 1
Aditya Shah
Aditya Shah 2021년 12월 1일
Yeah. Its working now. Thanks for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by