My data consists of 389 rows and 40 columns like (size(gather) 389 40). I want to extract 40 columns and rows from 105 to 381 (105:381) with new dimensions (size(gather) 276 40). How I can do it?

 Akzeptierte Antwort

Selim Gullulu
Selim Gullulu am 17 Feb. 2021

0 Stimmen

Hi,
if your initial matrix is M,
The new matrix,N can be created with:
N=M(105:381, : )

Weitere Antworten (1)

randerss simil
randerss simil am 17 Feb. 2021

1 Stimme

%if true
A = rand(389,40)
iwant = A(105:381,:)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by