Finding columns in a cell array containing finite elements
Ältere Kommentare anzeigen
Hi, I have a m*n cell array containing x and y coordinates , suppose K is a 3*2 cell array as follows:
K=
[Inf] [1x2 double] [Inf]
[Inf] [ Inf] [1x2 double]
[Inf] [Inf] [Inf]
I want to access the columns of the array that are not infinite. My aproach: find([K{f,:}]< inf) returns columns as 2,3 for the first row. I want the result to be just 2. The x and y coordinates occur at random positions.
Is there any way to find the columns of the cell array?
Thanks
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Specialized Power Systems finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!