Hello, Why i have vercat error? They are the same , but i have and error. Please view the image. Thanks
<<
>>

 채택된 답변

Star Strider
Star Strider 2016년 2월 15일

0 개 추천

They’re not the same:
B = [82:246, 117:351];
RowA = 82;
ColumnA = 117;
B_elements = [RowA 246; ColumnA 351]
B_elements_range = diff(B_elements,[],2)
B_elements =
82 246
117 351
B_elements_range =
164
234

추가 답변 (1개)

Dani D
Dani D 2016년 2월 15일

0 개 추천

Thank you, But i want create matrix with 164 rows(from 82 to 246 ) with 234 columns(from 117 351 ). What i do?

댓글 수: 1

It seems that you want to create it from an existing matrix.
This works:
A = randi(99, 250, 400); % Create Original Matrix
B = A(82:246, 117:351); % Create New Matrix From Elements Of ‘A’

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

태그

질문:

2016년 2월 15일

댓글:

2016년 2월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by