a small program help
1 回表示 (過去 30 日間)
古いコメントを表示
I have three files: 1) file1.ap and 2) file2.ap and 3)file3.ap with form as follows:
file1
1 2 3
4 5 6
7 8 9
file2
12 15 16
13 18 19
14 21 22
file3
22
24
33
i want to add 2nd and 3rd column of file 1 & file2 to file3 as rows i.e i want:
22 2 3 5 6 8 9
24 15 16 18 19 21 22
33
please help me with the program.
0 件のコメント
回答 (1 件)
Image Analyst
2014 年 4 月 3 日
You can do that with a cell array (<http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F>) or if you put something like nan in the "missing" columns of row 3. So fill out array 1 and 2 with nans, then stitch together
f_out = [f3, f1', f2'];
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!