How to call a function with multiple inputs in a script file?
์ด์ ๋๊ธ ํ์
I have created a function, which has three inputs and three outputs. I want that function to call in a script (.m) file. How can I do that?
์ฑํ๋ ๋ต๋ณ
์ถ๊ฐ ๋ต๋ณ (1๊ฐ)
madhan ravi
2020๋
7์ 5์ผ
ํธ์ง: madhan ravi
2020๋
7์ 5์ผ
https://www.mathworks.com/help/matlab/ref/function.html - on how to use functions properly.
A = 1;
B = 2;
C = 3;
[O1, O2, O3] = yourfunction(A, B, C) % assuming you saved the function in a file called yourfunction.m , from 2016b you can use function definitions directly in script files.
์นดํ ๊ณ ๋ฆฌ
๋์๋ง ์ผํฐ ๋ฐ File Exchange์์ Filename Construction์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!