Default Hyperlink display for getReport

조회 수: 4 (최근 30일)
Dan
Dan 2025년 5월 8일
댓글: Dan 2025년 5월 8일
MATLAB doc indicates that there is an ability to set the parameter, hlink, of the function getReport to the value of 'default' which will tell the function to honor the command window default for displaying hyperlinks. How do I set the default for the command window?
Thanks,
Dan

답변 (1개)

TED MOSBY
TED MOSBY 2025년 5월 8일
Hi,
As far as I understand your question, you want to configure the default value of 'hlink' without changing the flag in 'getReport'.
I found a command:
feature('HotLinks', true)
After setting it to true; now, the 'default' choice simply means “whatever the Command Window is configured to do right now”.
I tried it with an example:
  1. I first used the above command in the MATLAB command window
  2. Then just ran the script below:
me = MException('demo:oops','Something went wrong');
try
throw(me)
catch ME
txt = getReport(ME,'extended','hyperlinks','default');
disp(txt)
end
The output looked like this:
Whereas when I set 'Hotlinks' to false, I get this output after running the script:
Hope this is what you were looking for!
  댓글 수: 1
Dan
Dan 2025년 5월 8일
You seem to have accomplished the desired output, Ted, but unfortunately undocumented features are not inbounds for me. I have to think there is a way given the implications of the action mentioned in the table above. (if, as implied, there are defaults associate with the command window there there must be a way to change those.).
Dan

댓글을 달려면 로그인하십시오.

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by