필터 지우기
필터 지우기

How can I use a fonction result in a new script.

조회 수: 2 (최근 30일)
Viviana
Viviana 2013년 10월 17일
답변: Nishitha Ayyalapu 2013년 10월 17일
After run a function I get ans = ... on the command window. I wish to declare the result of mi function as a variable to use it in a new scrip. It's that possible?
Thanks

답변 (1개)

Nishitha Ayyalapu
Nishitha Ayyalapu 2013년 10월 17일
doc function
Example
function result = Addition(X,Y)
result = X+Y;
end
Now in any other script you can just do
Z = Addition(2,3);

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by