How to read cell range from one cell in file
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all
I want to read cell range from a file. Each cell of this file contains a different cell range. For example raw is the file and raw(2,3) = 3:4, 6:10
So I want X(raw{2,3}) which is the same as X(3:4,6:10) but when I run it they are not the same. Each one gives different result. Any idea how I can fix it?
2 件のコメント
回答 (2 件)
Andrei Bobrov
2013 年 5 月 6 日
raw(2,3) = {3:4, 6:10};
5 件のコメント
Andrei Bobrov
2013 年 5 月 6 日
raw = cell(3);
raw{2,3} = {3:4,6:10};
X = randi(18,10); eg
X(raw{2,3}{:})
Yao Li
2013 年 5 月 13 日
Try
raw{2,3}={3:4,6:10};
x=rand(10,10);
x(3:4,6:10)
x(raw{2,3}{1,1},raw{2,3}{1,2})
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!