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

3 views (last 30 days)
Ahamed Al Arifin
Ahamed Al Arifin on 2 Mar 2020
Edited: KALYAN ACHARJYA on 2 Mar 2020
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;

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 2 Mar 2020
Edited: KALYAN ACHARJYA on 2 Mar 2020
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

Categories

Find more on Images in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!