作者harristime (瀚宇)
看板MATLAB
标题如何写入整 Row 进入一个 Cell array
时间Sun Apr 24 00:50:36 2016
请参照下面的 code
我想把 Result 给写入一个 Cell array "Feature",
Result 会是一个 1 x 6656 的向量, 然後在我的回圈内
总共会有 150个 Result.
请问要如何将这150 Result 按顺序写入 一个 150 * 6656的 Cell array?
###########################################################
load data;
for i = 1:10
for j = 1:15
Result = hist(double(A_Set1{i,j})', 0:5:255)'./length(B_Set1{i,j});
Feature = Result(:)'; < ---- 如何才能每次都写入这个 Cell array?
end
end
###########################################################
谢谢
--
Sent from my Windows
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 137.44.90.69
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MATLAB/M.1461430239.A.457.html
1F:→ celestialgod: 为啥feature不用matrix 04/24 01:48
2F:→ celestialgod: 要存cell的话 可以改成 Feature(i*15+j,) = 04/24 01:49
3F:→ celestialgod: num2cell(Result(:)'); 04/24 01:49
4F:→ celestialgod: 少一个:,应该是Feature(i*15+j,:) = 04/24 01:52