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!