필터 지우기
필터 지우기

Create a row vector

조회 수: 227 (최근 30일)
Francis Adams Kwofie
Francis Adams Kwofie 2021년 6월 24일
댓글: Image Analyst 2023년 1월 23일
Create a row vector named x that starts at 1, ends at 10, and contains 5 elements.
  댓글 수: 3
Balanarayanan
Balanarayanan 2023년 1월 23일
Transpose b from a row vector to a column vector using the transpose operator.
Image Analyst
Image Analyst 2023년 1월 23일
@Balanarayanan This looks like a homework problem. If you have any questions ask your instructor or read the link below to get started:
Obviously we can't give you the full solution because you're not allowed to turn in our code as your own, but it will involve linspace and the ' (apostrophe) symbol.

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

채택된 답변

DGM
DGM 2021년 6월 24일
편집: DGM 2021년 6월 24일
one way:
x = 1:2.25:10
x = 1×5
1.0000 3.2500 5.5000 7.7500 10.0000
another way
x = linspace(1,10,5)
x = 1×5
1.0000 3.2500 5.5000 7.7500 10.0000
of course, nothing says the vector had to be linear:
x = logspace(0,1,5)
x = 1×5
1.0000 1.7783 3.1623 5.6234 10.0000
or monotonically increasing
x = [1 500 -pi sqrt(2) 10]
x = 1×5
1.0000 500.0000 -3.1416 1.4142 10.0000

추가 답변 (1개)

Image Analyst
Image Analyst 2021년 6월 24일
You learn these basics in the first half hour of the intro MATLAB course. Evidently you need to take this:
  댓글 수: 2
Balanarayanan
Balanarayanan 2023년 1월 23일
Transpose b from a row vector to a column vector using the transpose operator.
Image Analyst
Image Analyst 2023년 1월 23일

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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by