I have to call 2 functions, each with a different .m file, into a single .m file. How would I do this?

 채택된 답변

KSSV
KSSV 2018년 3월 1일

0 개 추천

Save the two m files as a funciton....and call them in a single m file.
function s = func1(a,b)
s = a+b ;
function d = func2(a,b)
d = a+b ;
Save the above two functions into m files. Call them in single m file:
a = rand ;
b = rand ;
s = func1(a,b) ;
d = func2(a,b) ;
a = s+d ;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

태그

질문:

2018년 3월 1일

댓글:

2018년 3월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by