What does this mean in a MATLAB function?
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I am having trouble understanding what is happening on the attached snippet of code. I know that "@" is creating anonymus function but I do not understand the ".f" and ".df1" since the only aparent output of the funtion is kern.
In advance, Thank you!
function kern = kGaussian(sig);
% functions kernel and ddkernel are in the same file
kern.f = @(x,y) kernel(sig, x, y)
kern.df1 = @(A, K, x, y) ddkernel(sig, A, K, x, y)
end
0 个评论
采纳的回答
Image Analyst
2020-7-1
kern is the output. It is a structure with two fields (members), one called f and one called df1.
The f field is the result of calling the kernel() function.
The df1 field is the result of calling the ddkernel() function.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!