How to create column vector

조회 수: 1 (최근 30일)
Meenakshi S
Meenakshi S 2017년 7월 14일
댓글: Jan 2017년 7월 14일
Create a column-vector containing 31 rows from 1 to -2 with regular intervals.

답변 (1개)

Guillaume
Guillaume 2017년 7월 14일
And also, Getting started with Matlab or any tutorial about matlab where the function is very likely to be introduced. Making some effort to learn matlab would be a lot more useful than asking people to do your homework.
  댓글 수: 1
Jan
Jan 2017년 7월 14일
@Meenakshi S: Then please post your code and explain the problems. The forum will (or at least should) not solve your homework, because this would reduce your chance to learn.
linspace solves the problem. Read its help text:
doc linsapce
But you can read the source code also and implement you own command:
edit linspace
You need the colon operator, see e.g.:
1:3:14

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by