필터 지우기
필터 지우기

how can i define two series of number in one coloumn?

조회 수: 2 (최근 30일)
Mili Kian
Mili Kian 2020년 6월 27일
댓글: Image Analyst 2020년 6월 29일
how can i define two series of number in one coloumn?
EX: a=1:10 , 62:73
i want gave answer like this: a=1 2 3 4 5 6 7 8 9 10 62 63 64 65 66 67 68 69 70 71 72 73

채택된 답변

madhan ravi
madhan ravi 2020년 6월 27일
a = [1:10 , 62:73]
  댓글 수: 2
Image Analyst
Image Analyst 2020년 6월 29일
Mili, note that this answer ( a = [1:10 , 62:73]) does not give a column vector like you asked for. To get a column vector, see 3 different ways in my answer below.

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

추가 답변 (1개)

Image Analyst
Image Analyst 2020년 6월 27일
Here are three different methods to create your column vector:
% Method one: create a row vector and transpose it with '
a = [1:10 , 62:73]'
% Method two: create a row vector and reshape it to a column vector
a = reshape([1:10 , 62:73], [], 1)
% Method three: create two column vectors, then concatenate with ;
a = [(1:10)'; (62:73)']

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by