How to display a 256x256 image from .mat file?
조회 수: 7 (최근 30일)
이전 댓글 표시
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');
댓글 수: 0
채택된 답변
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!