How can I extract a sub matrix B from a matrix A??

조회 수: 1 (최근 30일)
trailokya
trailokya 2015년 8월 5일
댓글: trailokya 2015년 8월 5일
Sir, I have a two dimensional matrix of dimension 129*135 say A(129,135) and the elements are basically for x-y plot where x=66.5:0.25:100 (129 POINTS); y=6.5:0.25:38.5 (135 POINTS); Now I want a sub matrix say for x=70:0.25:75 (21 POINTS) and y=20:0.25:25 (21 POINTS); say B(21,21). How can I get this new matrix B from the matrix A.Please help
  댓글 수: 2
Christiaan
Christiaan 2015년 8월 5일
Dear Sir,
How would you like to construct a matrix A from two vectors?
Kind regards, Christiaan
trailokya
trailokya 2015년 8월 5일
No..I have already a matrix A(129,135). From this matrix i need a sub matrix B(21,21)...Details are given above..

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

채택된 답변

Torsten
Torsten 2015년 8월 5일
편집: Torsten 2015년 8월 5일
B=A(15:35,55:75);
You can calculate the limits as
15=(70-66.5)/0.25+1
35=(75-66.5)/0.25
55=(20-6.5)/0.25+1
75=(25-6.5)/0.25
Best wishes
Torsten.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by