how to put/get a matrix from array
1 次查看(过去 30 天)
显示 更早的评论
hi guys. i have 4 matrixes. i put them in a array. now i want to get the nth matrix from this array. i used B(1) (forexample) but it gives me [2×2 double].
plz help me. how i can get the nth matrix ?
s0=[1 0;0 1];
sx=[0 1;1 0];
sy=[0 -1i;1i 0];
sz=[1 0;0 -1];
B={s0 sx sy sz};
0 个评论
采纳的回答
KALYAN ACHARJYA
2019-10-20
编辑:KALYAN ACHARJYA
2019-10-20
B{1}
Do call other cell array in simillar ways.
0 个评论
更多回答(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!