Two differente program to write in the same place

1 visualización (últimos 30 días)
Leonardo Barbosa Torres dos Santos
Leonardo Barbosa Torres dos Santos el 7 de Abr. de 2019
Editada: Rik el 7 de Abr. de 2019
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

Respuesta aceptada

Rik
Rik el 7 de Abr. de 2019
Editada: Rik el 7 de Abr. de 2019
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.

Más respuestas (0)

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by