creating variable of specified length and same values
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi,
How could I create a 4x1 variable of the value 1.2?
For example
1.2
1.2
1.2
1.2
댓글 수: 0
채택된 답변
추가 답변 (2개)
Azzi Abdelmalek
2013년 11월 15일
편집: Azzi Abdelmalek
2013년 11월 15일
a=1.2;
a=a(ones(1,4))
%or
a=repmat(1.2,1,4)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!