English 中文(简体)
储存在矩阵的囚室里的不明大小阵列如何交叉?
原标题:How to do intersection of arrays of unknown size which are stored in cells of a matrix?
  • 时间:2012-05-06 15:57:13
  •  标签:
  • matlab
  • cell

我有一个单元,叫M。 矩阵层面为零。

每一单元都有一系列指数(由于对一些体格进行reg盘问,而不是由它处理)。

I want to intersect the indices in the arrays in each cell of M.

我如何能够这样做? 如果我使用交叉功能,它知道如何从每个牢房的阵列中提取指数?

我的理解是,我不得不使用囚室,因为神经阵列面积不明。

最佳回答

这是你想要做的吗?

A = M{1};
for i = 2:numel(M)
  A = intersect(A, M{i});
end

我不认为采用单一<条码>浸cellfun。

If you only want the intersection of specific indices, you can do:

A = indices(1);
for i = indices(2:end)
  A = intersect(A, M{i});
end
问题回答

暂无回答




相关问题
Table cell stretching

I have two columns in my table with equal width (50%, 50%). I am showing search results URL in them. For big urls the columns are stretching and destroying the layout. Any suggestion to the problem?

Add Semicolon to each value (each line) in a cell

I have the following values in a single cell let be A1 1234 567 454 Likewise all the A(N) are filled with values. N various from 1000 to 1500 I want this to get converted as 1234;567;454 Any ...

Blank when NaN in jqGrid cells

How to set blank instead of NaN in jqGrid cells ? Using formatter ? Is there an example?

BeginEdit of a specific Cell from code behind

Is possibile begin edit of a specific cell from code behind with DataGrid control (WPF Toolkit)? I have to enable the celledittemplate of first cell of selected row after a button action...how can I ...

提供数据

我想让浏览头和一栏头目从使用因特网部分数据GridView的图像中获得一个习俗背景。 甚至有可能这样做吗? 如果是,如何?

热门标签