How to read cell range from one cell in file
Mostrar comentarios más antiguos
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 comentarios
Iman Ansari
el 6 de Mayo de 2013
X(raw{2,3})====X([3 4 6 7 8 9 10])
X(3:4,6:10)====X([3,4],[6 7 8 9 10])
Diana
el 6 de Mayo de 2013
Respuestas (2)
Andrei Bobrov
el 6 de Mayo de 2013
raw(2,3) = {3:4, 6:10};
5 comentarios
Diana
el 6 de Mayo de 2013
Andrei Bobrov
el 6 de Mayo de 2013
raw(2,3) = {3:4, 6:10};
X(raw{2,3})
Diana
el 6 de Mayo de 2013
Andrei Bobrov
el 6 de Mayo de 2013
raw = cell(3);
raw{2,3} = {3:4,6:10};
X = randi(18,10); eg
X(raw{2,3}{:})
Diana
el 13 de Mayo de 2013
Categorías
Más información sobre Cell Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!