if i have matrix i want to convert it to vector?

조회 수: 1 (최근 30일)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016년 5월 9일
답변: Fangjun Jiang 2016년 5월 9일
if i have this matrix
A = [1 2 3
4 5 6
7 8 9]
then i change it to a vector like that
b = reshape(A',1,9);
b = [ 1 2 3 4 5 6 7 8 9]
then how can i convert b vector to A matrix ???

채택된 답변

Fangjun Jiang
Fangjun Jiang 2016년 5월 9일
transpose(reshape(b,3,[]))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by