Why do I get an error when using the "legend" function with multiple outputs in MATLAB R2026a?
Show older comments
I want to create a legend for my figure by running the "legend" function with multiple outputs as follows:
>> [leg,labelhandles,outH,outM] = legend('d', 'g');
I encountered the following error:
Warning: Error updating Legend.
The reference object is invalid.
Is this error expected?
Accepted Answer
More Answers (0)
Categories
Find more on Legend 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!