make a vector from one value

조회 수: 24 (최근 30일)
Lev Mihailov
Lev Mihailov 2020년 7월 21일
편집: Bruno Luong 2020년 7월 21일
hello! I have values ​​0.421, I need to make a vector of 1200 values ​​of the same from it without a loop
% I need to do without a loop x=[​​0.421 ​​0.421 ​​0.421 ​​0.421 ...]

채택된 답변

Bruno Luong
Bruno Luong 2020년 7월 21일
편집: Bruno Luong 2020년 7월 21일
One way (among many)
x = 0.421 + zeros(1,1200)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by