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