query about using a function
3 次查看(过去 30 天)
显示 更早的评论
I have code for a function like we have inbuilt function in matlab.I mean that the code resembles the code that written for in biult matlab functions like plot stem etc...How am i suppose to use that function in my program??? i have attached the code which i got....how am i suppose to use it....??
0 个评论
回答(2 个)
Amit
2014-1-19
编辑:Amit
2014-1-19
I dont see the file attached. However, once you open that function in matlab, you'll see something like tyhis on the first line:
function [a,b] = function_name(x,y,z) % function name will be different
Here, x,y,z are the inputs and a and b are the outputs.
You can use the function as:
[m,n] = function_name(x,y,z);
Just make sure that this function's .m file is in the same folder that you're in.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!