showing error in this line ? please do help us to get the output ?

2 次查看(过去 30 天)
m1=max(max(A(i:i+95,j:j+127)));
  1 个评论
Stephen23
Stephen23 2016-1-26
编辑:Stephen23 2016-1-26
I guess this is indexing related, but there is not enough information. Please edit your question and give us the complete error message. This means all of the red text.

请先登录,再进行评论。

回答(1 个)

Star Strider
Star Strider 2016-1-26
You have to be certain your ‘A’ matrix is large enough so that your addressing does not access elements outside its index range.
This works:
A = randi(99, 200);
i = 10;
j = 20;
m1=max(max(A(i:i+95,j:j+127)));

类别

Help CenterFile Exchange 中查找有关 Desktop 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by