how can i store all simulation results from gibbs sampling ?

20 次查看(过去 30 天)
for example : for i=1:3 b=n*ones(3) end the result will be [3 3 3;3 3 3;3 3 3] BUT i want to save the hole result as [1 1 1;1 1 1;1 1 1;2 2 2;2 2 2;2 2 2;3 3 3;3 3 3;3 3 3] How can i do it????

采纳的回答

Muruganandham Subramanian
Check this:
for i=1:3
a{i}=i*ones(3);
end
b=cell2mat(a)
  2 个评论
arkedia
arkedia 2012-12-2
thanks for the answer , but the result will be [111222333;111222333;111222333] and the result i want is to be horizontal as [111;111;111;222;222;222;333;333;333] is it possible??

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Specialized Power Systems 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by