Calling two m.files

조회 수: 2 (최근 30일)
Cillian
Cillian 2012년 6월 29일
Hello.
Perhaps I have asked this question before, but this time, I would be more specific what I meant.
I have one m.file, called "calling.m", and with this I want to call two another files, called "file1.m" and "file2.m". How do I accomplish this?
I hope you will understand my text.
Thanks,
regards Cillian

답변 (1개)

Jan
Jan 2012년 6월 29일
I'm not sure if I understand the question, because the answer seems to be trivial:
function calling
file1
file2
That's it. Perhaps you want some inputs or output?
function Output1 = calling(Input1)
disp(Input1);
file1(375);
file2('This is a string');
Output1 = 'ready';
Does this help already? If so, I recommend to read the "Getting Started" chapters of the documentation, where such basics are explained.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by