How do i make an array like this?
1 次查看(过去 30 天)
显示 更早的评论
Currently i have this variable.
Can i check how do i make the array to become like this? Theres 2 rows of empty spacing for every value.
4
5
5
5
3 个评论
Elijah Smith
2019-10-30
x = [4; NaN; NaN; 5; NaN; NaN; 5; NaN; NaN; 5];
%or
x = {};
x{1,1} = 4;
x{4,1} = 5;
x{7,1} = 5;
x{10,1} = 5;
%or
x = ["4";"";"";"5";"";"";"5";"";"";"5"]
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!