Constucting an array in column form

2 ビュー (過去 30 日間)
Ian
Ian 2014 年 1 月 25 日
コメント済み: Amit 2014 年 1 月 25 日
Construct an array a (in column form) made of 17 (equally-spaced) values between 17 and 289.

採用された回答

Amit
Amit 2014 年 1 月 25 日
A = (linspace(17,289,17))';
  3 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 1 月 25 日
A = linspace(17,289,17)'
Amit
Amit 2014 年 1 月 25 日
The extra brackets are just habit, due to few times issue with 1:10' and (1:10)'!

サインインしてコメントする。

その他の回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 1 月 25 日
編集済み: Mischa Kim 2014 年 1 月 25 日
Use
c = linspace(17, 289, 19)
This results in 19 data points, including the two end points, 17 and 289. To switch between row and column vector simply use the "prime"
c'

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by