Need to know how to make a row vector of zeros and another number in a single command without explicitly entering the values

조회 수: 1 (최근 30일)
I need to know how to make a row vector of mainly zeros and another number in a single command, with out explicitly entering values, like this:
[0 0 6 0 0 6]
Any idea how to do this?

답변 (1개)

madhan ravi
madhan ravi 2019년 2월 17일
R=zeros(1,6);
R([3 6])=6
  댓글 수: 4

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

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by