How to read the size of a mat file?

1

I have a mat file with certain data. It has 10 rows per 500 columns but when I do:

matriz = load('Planilha.mat');
disp(size(matriz));

The result is 1 by 20. What's totally different than expected.

How do I get the correct size of a .mat file?

    
asked by anonymous 20.06.2018 / 20:02

2 answers

2

In addition to Marcelo Uchimura put in the answer, it is worth remembering that when you use

matrix=load('data.mat') 

or

matrix=load('data.mat','variavel')

You have a structure answer, not the matrix saved. Assuming that the flame matrix mt , to access it it is necessary to use

st=load('data.mat')
matrix=st.mt

or just use

load('data.mat') 

or

load('data.mat','variavel')

This will put the array in the workspace, the way you want it.

    
21.06.2018 / 14:17
0

Inspect saved variables within .mat with

whos -file Planilha.mat

Then, to load the variable you need, do

matriz = load('Planilha.mat','nomedavariavel')

Source: here

    
20.06.2018 / 22:26