Helll everybody,
A = zeros(672,34953);
I want to put a quadratic matrix (672,672) B, beginning at this spot (1,5377)
anybody has any idea how can i implement it quickly and efficiently ?
Thanks

 채택된 답변

Jan
Jan 2013년 10월 24일

0 개 추천

A( 1: 1 + size(B,1)-1, 5377 : 5377 + size(B, 2) - 1 ) = B;

댓글 수: 6

Michael
Michael 2013년 10월 24일
quick answer, quick solution. Thanks a lot
Jan
Jan 2013년 10월 24일
편집: Jan 2013년 10월 24일
You are welcome.
By the way: you may want to mark answers as 'accepted answer', if they helped you solve your problem.
Michael
Michael 2013년 10월 24일
is there a quick efficient solution as well for 2 similar little matrices ? like in spot (1,5377) and (1, 25347) ?
Jan
Jan 2013년 10월 24일
Very similar to the answer I gave you before. You will only have to adapt the spot indices.
Michael
Michael 2013년 10월 24일
so 2 lines for 2 matrices ?
John D'Errico
John D'Errico 2013년 10월 24일
Why is that a problem? If you really have something specific you are trying to solve, then ask a direct question.

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

추가 답변 (0개)

카테고리

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

질문:

2013년 10월 24일

댓글:

2013년 10월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by