- The function "coba.nilaiobjectivefunction" may not be returning a value for the output argument "objectivefunction". In this case, you may need to modify the function to ensure that it is properly computing and returning the desired output value(s).
- The function call syntax might be incorrect, leading to the output arguments not being properly assigned. Check that you are correctly specifying the output argument(s) in the function call.
- There may be a typo or other error in your code that is preventing the output argument from being assigned correctly.
Output argument "objectivefunction" (and maybe others) not assigned during call to "coba.nilaiobjectivefunction". How To Solve this error?
1 次查看(过去 30 天)
显示 更早的评论
There is a sentence like this "Output argument "objectivefunction" (and maybe others) not assigned during call to "coba.nilaiobjectivefunction".
0 个评论
回答(1 个)
Niranjan Sundararajan
2023-6-7
Hey there,
There are a few possible reasons why you could be getting this error. The most common ones are:
val_of_func = test_func(1) % correct call
val_of_func = test_func_err(1) % error call
A correct example:
function out = test_func(inp)
out = inp;
end
Possible errors:
function out = test_func_err(inp)
% not returning any value with the variable 'out'
out_misspelled = inp; % spelling mistake
end
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!