How can i make an image from a .mat file?

조회 수: 4 (최근 30일)
Ahamed Al Arifin
Ahamed Al Arifin 2020년 3월 2일
편집: KALYAN ACHARJYA 2020년 3월 2일
I have a .mat file. I want to make an image from that .mat file. The image i am getting is attached below. The image is just like a line. But i want it as a rectangle/square type of image.The code i am following is as follow-
filename = 'xcorrelation.mat';
s = load(filename);
% Extract array from structure.
n = s.xcorrelation;
imshow(n,[], 'InitialMagnification', 'fit');
axis on;

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 3월 2일
편집: KALYAN ACHARJYA 2020년 3월 2일
The data n=7544x53 double, which is shown in the figure as per data size, if the data have more columns then it may be show more wider ractangle.
If I added more random columns with n, then see the result
Hence it shows the n as per the dataset size, which is 7544x53

카테고리

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

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by