MATLAB Answers

What does this mean in a MATLAB function?

6 views (last 30 days)
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 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 1 Jul 2020
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.

More Answers (0)


Translated by