Hi all,
I have a matrix 6964x1441. I would like to keep the column every 24 (keep column 24, 48, 72 etc) and delete the other which will create a matrix 6964x60. Can someone help me pelase?
regards
Jonathan

 채택된 답변

Stephen23
Stephen23 2020년 9월 17일

0 개 추천

Where M is your matrix:
M = M(:,24:24:end)

댓글 수: 3

Jonathan Demmer
Jonathan Demmer 2020년 9월 17일
awesome thank you... i think i tried to make thing always more complicated...
Jonathan Demmer
Jonathan Demmer 2020년 9월 17일
Now, the problem is getting more complex. I have 15 matrices (6964x1441) and I want all of them to be (6964x60). The matrices are named lat_coast_1 until lat_coast_15 ( I did not name them like that, I know that is not the best but they are not my data and they are like that so i have to work with them).
Do you know if a loop could do that for all of them?
cheers
"I have 15 matrices (6964x1441) and I want all of them to be (6964x60)... Do you know if a loop could do that for all of them?"
C = {M1, M2, M3, ..., M15};
for k = 1:numel(C)
C{k} = C{k}(:,24:24:end);
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2020년 9월 17일

댓글:

2020년 9월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by