How do I find the value of the cell from a particular row number
2 ビュー (過去 30 日間)
古いコメントを表示
I have a data array consisting of 1 row and 4000 columns of data values, I want to find out the value which exists in certain cells, say for example row 1, column 2000, how would i go about this?
2 件のコメント
Stephen23
2017 年 8 月 1 日
"I have a data array ... I want to find out the value which exists in certain cells..."
What do you mean by a "data array": is this a file of some kind, or is it already in the MATLAB workspace?
採用された回答
Adam
2017 年 8 月 1 日
編集済み: Adam
2017 年 8 月 1 日
myArray{ 1, 2000 }
if it is a cell array or
myArray( 1, 2000 )
if it is a numeric array.
Although when using a 1d array I tend to omit the 1 and just use
myArray( 2000 )
which works equally, but
myArray( row, col )
is the generic acess.
3 件のコメント
Image Analyst
2017 年 8 月 1 日
List your columns in brackets:
extractedColumns = fullData(:, [1000, 2000, 3000, 4000]);
That will give you an array with all the rows and only those 4 columns.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!