Creating a matrix help

3 Ansichten (letzte 30 Tage)
Muhendisleksi
Muhendisleksi am 26 Mär. 2017
Kommentiert: Star Strider am 27 Mär. 2017
a=[111.23199; 354.44814; 186.69329]
b=[111.23199;111.23199;354.44814;354.44814;186.69329;186.69329]
How can I create a matrix "a" in the form of a matrix "b"?

Antworten (2)

Star Strider
Star Strider am 26 Mär. 2017
This works:
aa = [a'; a'];
aa = aa(:)
aa =
111.23
111.23
354.45
354.45
186.69
186.69
  5 Kommentare
Muhendisleksi
Muhendisleksi am 27 Mär. 2017
Thank you so much
Star Strider
Star Strider am 27 Mär. 2017
My pleasure.
If my Answer helped you solve your problem, please Accept it.

Melden Sie sich an, um zu kommentieren.


Jan
Jan am 26 Mär. 2017
With a modern Matlab version:
aa = repelem(a, 2, 1)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by