how to make a row matrix from matlab generated data.

Hi all,
I have a matlab code that outputs the reselts in the form of s(:,:,1) = 'value' , s(:,:,2)='value' , s(:,:,3)='value' and so on.
Now, I want to combine all these " S " to form a single row matrix or a single column matrix.
thanks...

2 件のコメント

madhan ravi
madhan ravi 2019 年 2 月 22 日
could you show what
size(s) shows?
whos s
SATYA BHATT
SATYA BHATT 2019 年 2 月 22 日
I am doing it for mXn matrix ( user defined)
for a 2X6 matrix input ,
size(s) shows
ans=1 1 2

サインインしてコメントする。

 採用された回答

Jos (10584)
Jos (10584) 2019 年 2 月 22 日

0 投票

reshape(S,1,[]) % row vector

1 件のコメント

Jos (10584)
Jos (10584) 2019 年 2 月 22 日
You might also be interested in using SQUEEZE.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by