How can we create a vector of length n

조회 수: 280 (최근 30일)
Omar B.
Omar B. 2019년 9월 19일
댓글: Omar B. 2019년 9월 19일
Hello,
How can we write in Matlab vector u= [1/10 ,1/10 ,..., 1/10] where u \in{R}^{200}

채택된 답변

James Tursa
James Tursa 2019년 9월 19일
편집: James Tursa 2019년 9월 19일
There are many ways of doing this. E.g., use the ones( ) function and divide by 10. Or use the zeros( ) function and add 1/10. Or use the repelem( ) function. Etc.
  댓글 수: 2
Bruno Luong
Bruno Luong 2019년 9월 19일
1/10+zeros(1,200)
1/10*ones(1,200)
Omar B.
Omar B. 2019년 9월 19일
Thank you so much

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by