Finding a Number in a random array
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Turlough Hughes
le 7 Oct 2019
0 votes
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.
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!