Problem with Vercat error
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, Why i have vercat error? They are the same , but i have and error. Please view the image. Thanks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155002/image.jpeg)
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155010/image.jpeg)
>>
댓글 수: 0
채택된 답변
Star Strider
2016년 2월 15일
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
댓글 수: 0
추가 답변 (1개)
Dani D
2016년 2월 15일
댓글 수: 1
Star Strider
2016년 2월 15일
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’
참고 항목
카테고리
Help Center 및 File Exchange에서 Denoising and Compression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!