creating variable of specified length and same values
古いコメントを表示
Hi,
How could I create a 4x1 variable of the value 1.2?
For example
1.2
1.2
1.2
1.2
採用された回答
その他の回答 (2 件)
Azzi Abdelmalek
2013 年 11 月 15 日
編集済み: Azzi Abdelmalek
2013 年 11 月 15 日
a=1.2;
a=a(ones(1,4))
%or
a=repmat(1.2,1,4)
ES
2013 年 11 月 15 日
a(1:4,1)=1.2
カテゴリ
ヘルプ センター および File Exchange で Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!