Merging 2 mat files

1 回表示 (過去 30 日間)
Akhil Reddy
Akhil Reddy 2019 年 3 月 23 日
コメント済み: Akhil Reddy 2019 年 3 月 23 日
I have 2 mat files each having 4 variables lets say a,b,c and d.
mat file 1 variables:
variable a size 14 X 25
variable b size 14 X 1000
variable c size 14 X1
variable d size 14 X 4
mat file 2 variables:
variable a size 36 X 25
variable b size 36 X 1000
variable c size 36 X1
variable d size 36 X 4
I need a single mat file with variable sizes as
variable a size 50 X 25
variable b size 50 X 1000
variable c size 50 X1
variable d size 50 X 4
Can anyone help me with this one?

採用された回答

Sajeer Modavan
Sajeer Modavan 2019 年 3 月 23 日
clc
clear
x1 = load('mat_file_1.mat');
x2 = load('mat_file_2.mat');
a = [x1.a;x2.a];
b = [x1.b;x2.b];
c = [x1.c;x2.c];
d = [x1.d;x2.d];
  1 件のコメント
Akhil Reddy
Akhil Reddy 2019 年 3 月 23 日
Thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by