randomAffine3d() claim to take function handle for shear, but parser fails it
조회 수: 4 (최근 30일)
이전 댓글 표시
According to the doc of randomAffine3d:
Shear — Range of shear
[0 0] (default) | 2-element numeric vector | function handle
...
A function handle. The function must accept no input arguments and return the shear angle as a numeric scalar. Use a function handle to pick a shear angle from a disjoint interval or using a nonuniform probability distribution.
When using this function e.g.
function A = selectShear1
A = -(rand(1,1)*5+5);
end
the validator (below) returns with this error message:
'The value of 'Shear' is invalid. Expected Shear to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64
Instead its type was function_handle.'
which seems to be alright given:
function TF = validateShear(val)
iValidateNumericRange('Shear',val,'<',90,'>',-90);
TF = true;
end
That it after all doesn't take function handles...
댓글 수: 1
Steven Lord
2023년 3월 24일
Can you show us the code you've written to call randomAffine3d using this function handle?
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!