conversion of array to vector

i want to know how can we convert i list of array to a vector form
plz tell me by writing some piece of code....
Mean=[];
Mean=mean2(inpImage);
disp(Mean);
how i can convert the above amaean array to vector?

답변 (1개)

Miroslav Balda
Miroslav Balda 2013년 3월 9일

0 개 추천

The first command is useless. Suppose inpIamage is a matrix, the character of Mean depends of your function mean2. Should function mean2 be equal mean, the variable Mean would be row vector. The column vector you gain by Mean(:).
If the function mean2 yields Mean being a cell array, you should use a conversion of the array to real vector, say Mean{:} of cell2mat function.

댓글 수: 1

Prakhar Vishnoi
Prakhar Vishnoi 2018년 3월 15일
편집: Prakhar Vishnoi 2018년 3월 15일
p={'dxw','ff'};
p(1)
cell2mat(p(1))
%try the code above to understand
%Thanks

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

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

질문:

2013년 3월 9일

편집:

2018년 3월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by