필터 지우기
필터 지우기

Need to take specific data from a (1296*1) matrix

조회 수: 1 (최근 30일)
Mohammad
Mohammad 2012년 12월 4일
Hi, I have a data matrix of (1296*1), from which I need to collect first 3 data then next 9 data should be deleted and again 13 to 15 positioned data I need to collect..next 9 positioned data should be deleted...so on. (Actually I have 108 years temperature data from which I need to collect only Jan, Feb and March month data for every year). I'm a new user in Matlab. Please help me how can I define this issue in coding. Thanks.

답변 (1개)

Image Analyst
Image Analyst 2012년 12월 4일
How about something like this:
data = randi(9, [1296, 1])
data2 = reshape(data, [1296/12, 12])
out = data2(:, 1:3)
out2 = reshape(out, [numel(out), 1])

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by