Array inside an array
111 次查看(过去 30 天)
显示 更早的评论
I have to insert a 3x1 matrix into a another matrix where this 3x1 matrix would be the first element of that matrix. Can anyone please tell me how do i do that?
0 个评论
回答(2 个)
Mario Malic
2021-1-24
Hi,
You can do this with cell arrays
a =cell(3,1);
b = rand(3,1)
b =
0.8147
0.9058
0.1270
a{1} = b
a =
3×1 cell array
{3×1 double}
{0×0 double}
{0×0 double}
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!