creating array with entries as numbers
1 回表示 (過去 30 日間)
古いコメントを表示
i want to create an array indexing i=1:10
such that n{i}=1.44:1.45
so it must display n1=1.44
n2=1.441
.
.
n10=1.45
n=[n1 n2 n3 n4.....n10]
please help with this
1 件のコメント
回答 (1 件)
Alex Mcaulley
2020 年 2 月 24 日
Do you mean this?
n = 1.44:0.001:1.45;
2 件のコメント
Alex Mcaulley
2020 年 2 月 24 日
Then, as Stephen said use linspace:
n = linspace(1.44,1.45,10)
参考
カテゴリ
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!