
access row and column number in variable editor
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can I access the row- and columnnumbers of one (or more) selected entries in a vector, displayed in the variable editor? The information is shown in the toolstrip on the screen, but how can I get these information via command window?
edit: I need to get the selected range, not the data inside this range
example:
XX = rand(10);
now I open the variable editor and select manually the rows 3 to 7 and comlumns 4 and 6. Now I need a function which output is:
selectedRows = 3,4,5,6,7
selectedColumns = 4,6
0 commentaires
Réponses (1)
Orion
le 12 Nov 2014
Access it with the index of your data.
XX = rand(10);
edit with the vriable editor and select some part:

then, in Matlab :
>> XX(3:7,[4,6])
ans =
0.2769 0.6551
0.0462 0.1626
0.0971 0.1190
0.8235 0.4984
0.6948 0.9597
0 commentaires
Voir également
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!