필터 지우기
필터 지우기

Two differente program to write in the same place

조회 수: 1 (최근 30일)
Leonardo Barbosa Torres dos Santos
편집: 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 CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by