Hi Stephen,
It appears that the function `SSDelta` is not recognized within the context of the `fminbnd` optimization call. This issue arises because the `SSDelta` function is defined as a method within the class or app that you are working with (assuming it is an App Designer app given your reference to `appdesigner`).
To address this problem, you need to ensure that the `SSDelta` function is accessible within the scope of the optimization call. One way to achieve this is by explicitly referencing the method within your App Designer app.
You can modify your code as follows:
1. Ensure that the `SSDelta` method is defined within your App Designer class or app script. 2. Modify the optimization call to directly reference the method within the app instance. You can do this by calling `app.SSDelta` instead of just `SSDelta`.
Here's an updated snippet of your code with these modifications:
% Inside your App Designer class or script
methods (Access = public)
function SSD = SSDelta(app,dTime)
% Your existing SSDelta function implementation end end
% Update the optimization call to use 'app.SSDelta'
dTime = fminbnd(@(x) app.SSDelta(x), -20.0, 20.0);
By making these adjustments, you should be able to resolve the "Undefined function 'SSDelta' for input arguments of type 'double'" error and successfully run your optimization routine to determine the time offset that minimizes the sum of squares of differences between your data sources.
Hope this will help resolve your issue.
