Finding a position of a element in a matrix

Turlough Hughes ha marcado con alerta este/a pregunta
  • Marcado con alerta como Duplicada por Turlough Hughes hace el 6 de En. de 2022.

    Duplicate of: https://uk.mathworks.com/matlabcentral/answers/1623395-finding-out-the-minimum-value-position-of-a-matrix?s_tid=srchtitle

I have a matrix a=[1 2 3 4 5 10;2 3 5 6 1 12;2 6 4 5 7 16;10 2 1 4 5 20;2 3 1 4 9 12]
I want to find out the minimum value postion of this matrix in 2nd row from 1st to 3rd column
I have written this code
[i1,j1]=find(a(2,1:6)==min(a(2,1:3)))
but instead of giving 2nd row 1st column as the minimum value postion, it is showing the result like this
i1 =
1
j1 =
1

Respuestas (0)

La pregunta está cerrada.

Productos

Etiquetas

Preguntada:

el 6 de En. de 2022

Cerrada:

el 6 de En. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by