AbstractPolicy.m debug warning
Show older comments
Hi there,
Could someone please explain what the following debug warning in AbstractPolicy.m means?
% DEBUG: limit to scalar policies only. To step multiple
% policies caller may use loops.
assert(isscalar(this));
Answers (2)
Yongjian Feng
on 2 Jul 2021
0 votes
Hello kloner,
Basically it means that 'this' can not be an array. It must be a scaler. As explained in the comment, if you have an array, then just loop through the array and call the function for each element in the array.
Thanks,
Yongjian
2 Comments
Yongjian Feng
on 2 Jul 2021
What is an riQAgent?
You can also do these to narrow it down:
- If you run this from the debugger, set a break point there, and type isscalar(this) in the command line window.
- type class(this) to make sure it is indeed riQAgent.
- type which isscalar to check if it is the built-in isscalar being called.
kloner
on 4 Jul 2021
0 votes
3 Comments
Yongjian Feng
on 5 Jul 2021
I see. Now which function/method of rlQAgent did you call when you got into this debug error?
I tried getAction, and it is working there at least. Reproduction steps are needed to narrow down the problem.
Thanks,
Yongjian
Yongjian Feng
on 7 Jul 2021
No attachments here. Can you double check please?
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!