How do i make an array like this?

2 ビュー (過去 30 日間)
Yuan Jun Lim
Yuan Jun Lim 2019 年 10 月 30 日
コメント済み: Elijah Smith 2019 年 10 月 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 件のコメント
Yuan Jun Lim
Yuan Jun Lim 2019 年 10 月 30 日
If i were to put NANs in between,
how do i write it?
Sorry , i'm quite new to this.
Elijah Smith
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 ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by