How to construct a Row Vector
Ältere Kommentare anzeigen
I want to construct a row vector, with say, "L zeros", followed by a "1", and then again followed by "L Zeros"
What is the easiest command to do that? For example a= [ (0 0 0 ... L-1(0)) 1 (0 0 0 ... (L-1) 0)]
Akzeptierte Antwort
Weitere Antworten (1)
Make a row zero matrix...and place one at the indices you want....
or
k = repmat([0 0 0 1],1,4)
1 Kommentar
M Salman Rashed
am 14 Okt. 2016
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!