Two differente program to write in the same place

2 ビュー (過去 30 日間)
Leonardo Barbosa Torres dos Santos
Leonardo Barbosa Torres dos Santos 2019 年 4 月 7 日
編集済み: Rik 2019 年 4 月 7 日
Dear, I have a question about write data in the same file using two different program.
I have a program call main.m and other call transfer.m
Each program find different results
The first program (main) find 19 line and 6 column (19x6) Double
The second program (transfer) find 19 line and 36 columns (19x36) Double
I would like match these two program to write a program, xx, with 19 lines and 42 columns (19x42) Double. 42 columns because 6 columns of main program + 36 columns of transfer program.
That is, the first line of the two program (main and transfer) is the first line of xx program. The columns 1 until 6 of xx program is the columns 1 until 6 of main program. the columns 7 until 42 of xx program is the columns 1 until 36 of program transfer.
The second line of two program (main and transfer) is the second line of xx program. The columns 1 until 6 of xx program is the columns 1 until 6 of main program. the columns 7 until 42 of xx program is the columns 1 until 36 of program transfer.
.
.
The 19 line of two program (main and transfer) is the 19th line of xx program. The columns 1 until 6 of xx program is the columns 1 until 6 of main program. the columns 7 until 42 of xx program is the columns 1 until 36 of program transfer.
Thank you advanced

採用された回答

Rik
Rik 2019 年 4 月 7 日
編集済み: Rik 2019 年 4 月 7 日
This is just a simple concatenation:
function output=xx
output=[main transfer];
end
function output=main
output=rand(19,6);
end
function output=transfer
output=rand(19,36);
end
You should consider a tutorial like this one, and also read this page before posting your next question.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by