Can argument validation check if size is at least some value?
7 次查看(过去 30 天)
显示 更早的评论
I understand that the arguments block can check if an argument is exactly a given size, but is there a way to check if an array is at least a certain size? (without using a custom validation function)
Example
arguments
a (:,4) % must be exactly 4 columns
b (:, >=4) % must have at least 4 columns
end
0 个评论
采纳的回答
Steven Lord
2023-5-9
No. You will need to create your own custom validation function. Use the mustBeEqualSize example on this documentation page as a model.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Argument Definitions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!