Default Hyperlink display for getReport

2 Ansichten (letzte 30 Tage)
Dan
Dan am 8 Mai 2025
Kommentiert: Dan am 8 Mai 2025
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

Antworten (1)

TED MOSBY
TED MOSBY am 8 Mai 2025
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 Kommentar
Dan
Dan am 8 Mai 2025
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

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by