Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个图像框架及其均值和方差。我想同时访问几帧均值和方差。为此,我需要索引每个帧中的均值和方差。
[M V] = mean_var(frame);
我有一个计算帧均值和方差的函数。我怎样才能将它们索引为它们的序列?
假设你的框架有一个单元阵列
frames = { frame1, frame2, ... };
您可以通过
[m v] = cellfun( @mean_var, frames );
现在你有向量和 m元素保持帧的均值和方差。vnumel(frames)
m
v
numel(frames)