MATLAB Answers


Filtering data based index from a cell.

Hari krishnan さんによって質問されました 2019 年 1 月 23 日
最新アクティビティ Hari krishnan さんによって コメントされました 2019 年 1 月 26 日
Hi, I have a matfile as attached. There are cells in the first column and within each cell, i have some data. What if i want to take data from this cell corresponding to indices which are only multiples of 14? Any help will be appreciated.

  0 件のコメント

サインイン to comment.


1 件の回答

Adam Danz
回答者: Adam Danz
2019 年 1 月 23 日

Your variable "max_sin_value_part1" is a [40x1] cell array. Each element contains a [1x1] cell array and that cell array contains a vector of doubles.
Here's an example of how to index multiples of 14 from the 6th element of your variable.
I suggest you first clean up your variable to get rid of the nested cell arrays.
max_sin_value_part1b = [max_sin_value_part1{:}];
Now the variable such contains a cell array of vectors rather than a cell array of a cell array of vectors. This simplifies the example above to:

  1 件のコメント

Hari krishnan 2019 年 1 月 26 日
@ Adam. Thank you very much. It helped me a lot.

サインイン to comment.

Translated by