フィルターのクリア

How to Append all values in single array in MATLAB

2 ビュー (過去 30 日間)
Med Future
Med Future 2022 年 2 月 27 日
コメント済み: Walter Roberson 2022 年 2 月 27 日
Hello, I hope you are doing well.
I have the following code which gives the four output array. but i want the output to be single array how can i do that.
The output is the numeric array in out1,out2,out3 and out4. i want the output to be in single array like overalloutput How can i do that in matlab
and every row with 1000 values How can i do that?
prfSTG = [200 400 800 1000 800 ];
n_pulsesSTG = [800 800 800 800 800 800 ];
out1 = repmat(prfSTG,1,(ceil(sum(n_pulsesSTG)/length(n_pulsesSTG))));
prf = [200];
n_pulsesconstant = [4000];
out2 = repmat(prf,1,(ceil(sum(n_pulsesconstant)/length(n_pulsesconstant))));
out3 = (rand(1,4000)*100)+750;
val = [200,500,800,1000,800,900,700,300,600,150];
num = [120,400,830,400,300,450,200,400,500,400];
out4 = repelem(val,num);

採用された回答

KSSV
KSSV 2022 年 2 月 27 日
iwant = [out1 out2 out3 out4];
  5 件のコメント
Med Future
Med Future 2022 年 2 月 27 日
@Walter what if I want to break down then length of values to 1000 For example I have 4000 samples and every row has 1000 values.
Walter Roberson
Walter Roberson 2022 年 2 月 27 日
NumberPerRow = 1000;
Output = reshape(TheData, NumberPerRow, []).';

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by