Constucting an array in column form

2 Ansichten (letzte 30 Tage)
Ian
Ian am 25 Jan. 2014
Kommentiert: Amit am 25 Jan. 2014
Construct an array a (in column form) made of 17 (equally-spaced) values between 17 and 289.

Akzeptierte Antwort

Amit
Amit am 25 Jan. 2014
A = (linspace(17,289,17))';
  3 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 25 Jan. 2014
A = linspace(17,289,17)'
Amit
Amit am 25 Jan. 2014
The extra brackets are just habit, due to few times issue with 1:10' and (1:10)'!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Mischa Kim
Mischa Kim am 25 Jan. 2014
Bearbeitet: Mischa Kim am 25 Jan. 2014
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'

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by