Constucting an array in column form

조회 수: 5 (최근 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 CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by