Finding a Number in a random array
Mostrar comentarios más antiguos
So I am given the code p1pA=magic(7).
How would I use Matlab to find the number in the fourth row and sixth column?
Also how would I find the twentieth number?
Respuesta aceptada
Más respuestas (1)
Turlough Hughes
el 7 de Oct. de 2019
0 votos
Have a look at the following documentation and scroll down to the part about indexing matrices with two subscripts. For your second question I believe you are looking for linear indexing which is the next section.
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!