Creating a matrix help

조회 수: 1 (최근 30일)
Muhendisleksi
Muhendisleksi 2017년 3월 26일
댓글: Star Strider 2017년 3월 27일
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"?

답변 (2개)

Star Strider
Star Strider 2017년 3월 26일
This works:
aa = [a'; a'];
aa = aa(:)
aa =
111.23
111.23
354.45
354.45
186.69
186.69
  댓글 수: 5
Muhendisleksi
Muhendisleksi 2017년 3월 27일
Thank you so much
Star Strider
Star Strider 2017년 3월 27일
My pleasure.
If my Answer helped you solve your problem, please Accept it.

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


Jan
Jan 2017년 3월 26일
With a modern Matlab version:
aa = repelem(a, 2, 1)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by