필터 지우기
필터 지우기

Get value from function to be used in program

조회 수: 2 (최근 30일)
monkey_matlab
monkey_matlab 2016년 4월 2일
답변: Walter Roberson 2016년 4월 2일
Hello,
I wrote a simple function program called ADD:
function A = ADD(N,M);
A = N + M
return
and this is the main program:
N = 10;
M = 30;
ADD(N,M);
sin(2*pi*A);
When I run the main program, I get the error that says "Undefined function or variable 'A' ".How do I go about making the value from the ADD function available to the main program? I have both the function and main program in the same folder.
Thanks for your help!

채택된 답변

Walter Roberson
Walter Roberson 2016년 4월 2일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by