Create help that displays in the help window for a variable that loads in the workspace.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
André Bernal García
el 20 de Oct. de 2017
Comentada: André Bernal García
el 25 de Oct. de 2017
Hi,
Im working with a quite large number of arrays and variables in the workspace and I would like to know if it is possible to write a help file for them.
I know I can do it for a self created function at the beginning, but I am trying to do so for the variables so when I define :
B_friends= [4 6 5 2 6 8 9 12 56]
And I click on B_friends later on and on Help I can see what B_friends ( Birthday friends) means. This example is stupid but I am dealing with a lot of different names and I would like to avoid going to the begging each time to the place where I defined it (that might be another file).
Thanks in advance
0 comentarios
Respuesta aceptada
John D'Errico
el 21 de Oct. de 2017
There is no facility to provide user written help on a variable, or mouseover capability to do the same.
Perhaps an option is to use structs. Include in each struct a help field, as well as a field that actually contains the information in the variable. Or, you could write your own class to do the same. In any case, these variables will be more cumbersome to work with and use. I seriously doubt it is worth the effort.
As Rik suggested, a good option is to learn to use descriptive variable names. Don't name your variables a,b,c, etc. There is no charge for longer variable names, and a good descriptive name is well worth the effort, in terms of debugging and just ease of use. Tab completion will make things easy.
Más respuestas (1)
Rik
el 21 de Oct. de 2017
As far as I know, it is impossible to have a mouse-over with more information for variables. The only solution would be to have clear names. Extremely long names can be a nuisance, but there tab-completion should come to the rescue.
Ver también
Categorías
Más información sobre Variables 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!