필터 지우기
필터 지우기

Extract an arbitrary vector from a matrix

조회 수: 1 (최근 30일)
Pepe Grillo
Pepe Grillo 2022년 1월 4일
댓글: Pepe Grillo 2022년 1월 4일
Hi!
I have a Matrix X (97, 241) and other Y (97, 241) in reference to Longitude and Latitude.
I want to extract a vector from each one that is a combination of differents Rows and Columns.
This combination is specify by an specific starting point and end, lets say I want to start at (4,8) and end at (81, 25) so I want a vector of latitude and other of longitude that are the points connecting this to inicial and ending point.
Thanks!

채택된 답변

KSSV
KSSV 2022년 1월 4일
idx = 4:81 ;
idy = 8:25 ;
x = X(idx,idy) ;
y = Y(idx,idy) ;

추가 답변 (0개)

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by