Ältere Kommentare anzeigen
how can we convert scalar to vector
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 24 Apr. 2011
If S is your scalar, you can use any of the following:
reshape(S,1,[])
reshape(S,[],1)
S(:)
S.'
S(end) = S;
kron(S,1)
full(sparse(S))
Oleg Komarov
am 24 Apr. 2011
0 Stimmen
I think he intends to repmat the scalar.
1 Kommentar
Walter Roberson
am 24 Apr. 2011
Considering the other active questions by the user, I doubt that myself.
Kategorien
Mehr zu Characters and Strings 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!