create a matrix with the same entry

I would like to create, given x and NRows, a vector y that is NRows*1 and every element of y is x. Please advise.

 採用された回答

Rik
Rik 2018 年 4 月 14 日

0 投票

Something like this maybe?
y=x*ones(NRows,1);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

製品

タグ

質問済み:

2018 年 4 月 14 日

回答済み:

Rik
2018 年 4 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by