Highlighting ALL occurrences of a given string using Find
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
z8080
el 19 de Abr. de 2022
Comentada: z8080
el 16 de Mayo de 2022
I'd like to search for a word that appears very often in my script — often enough that to go from occurrence to occurrence using F3 is not practical.
Instead, I would like to have all the occurrences of that word highlighted in my script, so I can quickly scan the script and find the occurrence i need.
I don't just mean highlighting of variables but of whatever search string is entered in the find box
Is there a way to do this in Matlab? In Chrome for instance it looks like this:
I'm almost certain this cannot be attained in the current version of Matlab, for which reason perhaps I would suggest this go down as a piece of feedback for the next version.
Respuesta aceptada
Image Analyst
el 16 de Mayo de 2022
If you simply click your cursor in a variable name, it will highlight all instances of that variable in the current scope. Sorry but it works only for variable names, not arbitrary text strings.
If a question goes unanswered for more than a day or so, it could be due to one of these reasons
- The question is so esoteric that no one who's looked over the list of questions felt like they were knowledgeable to answer it. If you ask a very specialized question that only one person in 10 thousand would know how to solve, then that one person may not have visited the Answers forum (yet).
- There is too much information missing so that no concise answer could be given. Like it depends on some missing info and could be one of 10 different kinds of answers depending on what was missing. Or it's just too vague like "tell me how to solve differential equations."
- There is too much information. Posting your whole program in the message box when the whole program is a thousand lines or more will probably lead to people ignoring it, especially if it's an alphabet soup mess of a program with short, cryptic variable names and no comments.
- Code is posted as a screenshot rather than as text. No one is going to type all that stuff it. You have to make it easy for people to help you or else they'll just move on to the next question.
- It would take too long to answer. If it can be answered in 5 minutes or less it probably will be. If it's going to take hours or longer, probably not, or perhaps it will just get a link to somewhere that may help, like to a paper or VisionBibliography or PubMed or somewhere. For example "I need biometric code to do facial recognition and speaker identification for authentication/access purposes". No one is going to spend months to write that for them, and even if they did have it probably would not bundle it up and hand it over, and then spend hours explaining how to run it.
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!