access row and column number in variable editor

조회 수: 8 (최근 30일)
André Schmitz
André Schmitz 2014년 11월 12일
편집: André Schmitz 2014년 11월 12일
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

답변 (1개)

Orion
Orion 2014년 11월 12일
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

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by