필터 지우기
필터 지우기

Matrix function [row:column] help

조회 수: 1 (최근 30일)
Dalton Houghton-Schaffer
Dalton Houghton-Schaffer 2019년 9월 5일
답변: Fangjun Jiang 2019년 9월 5일
When playing with the matrix B1 I am confused about what the result from RowColumn does. When I run the program it results in 1 but I don't understand the reasoning behind it. Can someone please explain this to me?
B1 = [2 4 6 8; 10 12 14 16; 18 20 22 24; 26 28 30 32]
idx_8=find(B1==8)
[row,column]=find(B1~=8)
RowColumn = [row:column]

채택된 답변

madhan ravi
madhan ravi 2019년 9월 5일
https://in.mathworks.com/help/matlab/ref/colon.html#description - second example in description explains clearly
What you get is simply
>> 1:1
ans =
1
>>

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 9월 5일
It must mean to be
RowColumn = [row,column]

카테고리

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