Matrix function [row:column] help
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dalton Houghton-Schaffer
el 5 de Sept. de 2019
Respondida: Fangjun Jiang
el 5 de Sept. de 2019
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]
0 comentarios
Respuesta aceptada
madhan ravi
el 5 de Sept. de 2019
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
>>
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!