Problem 1408. Given the name from the legend, return the handle

Write a function that will return the handle to the desired object. The input for this function will be a string which represents the objects name which has been created through a call to the "legend" function.

Example:

h_right = plot(1:2,1:2,'ro'); hold on; h_wrong = plot(1:3,1:3,'bx')

legend('Right','Wrong');

h_match = GetHandleByName('Right');

The test suite will test for: isequal(h_match,h_right)

Solution Stats

47.73% Correct | 52.27% Incorrect
Last Solution submitted on Feb 25, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers18

Suggested Problems

More from this Author4

Problem Tags

Community Treasure Hunt

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

Start Hunting!