当前位置:网站首页>How to call self written functions in MATLAB

How to call self written functions in MATLAB

2022-06-26 14:13:00 Orange tea must be ^ -^

1. Create a function

Generally, you should pay attention to the structure of the function when you write the function yourself , These include : Function name , The input values , Output value , The following is an example ,function Create a function ,‘JEntropy’ For function name ,( To be saved m The file name should match the function name ), Otherwise, the creation function does not hold , The input value is in the brackets to the right of the equal sign , namely :xy; The value to the left of the equal sign is the output value , Is the evaluated value e

 2. Call function

To call a function, you need to add the created function to the path first , And then in matlab Command bar .

Invocation time , I / O to be associated with the created The variables in the function are consistent , Generally, it only needs function Copy the function after , As shown in the figure below :

 

原网站

版权声明
本文为[Orange tea must be ^ -^]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170509533907.html