Load matrix from .mat files

3 Ansichten (letzte 30 Tage)
Andrea Togni
Andrea Togni am 14 Okt. 2021
Kommentiert: Mathieu NOE am 19 Nov. 2021
Hi,
I've got ten .mat files (P0.mat,P1.mat,P2.mat,ecc) in each of them I have a 256 * 10 matrix, I want to read them and create a single 256 * 100 matrix, how can I do?
Thanks
Andrea

Antworten (1)

Mathieu NOE
Mathieu NOE am 14 Okt. 2021
hello
try this :
data_all = [];
for ci = 1:10
filename = ['P' num2str(ci-1) '.mat'];
data = load(filename);
data_all = [data_all data]; % horizontal concatenation
end
  3 Kommentare
Mathieu NOE
Mathieu NOE am 5 Nov. 2021
hello
do you mind accepting my answer ?
tx
Mathieu NOE
Mathieu NOE am 19 Nov. 2021
hello
how is it going ?
problem solved ?
all the best

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by