Colored parentheses by nested level
68 views (last 30 days)
Show older comments
Hello all, this is my first posting , so bear with me if I fail to provide all necessary information the first time though.
I was wondering if Matlab has the capability to detect nested parentheses and match levels by color in the Editor and the Command Window. If so, a brief tutorial in enabling such a function would be greatly appreciated. for example:
This:
SQRT((gamma+1)/(gamma-1))*atand(SQRT(((gamma-1)/(gamma+1))*(M^2-1)))-atand(SQRT(M^2-1))
displays as this
This just makes user interaction and identification of different layers a lot more quick and efficient in my opinion. Any help would be appreciated.
5 Comments
Star Strider
on 26 Apr 2014
I’d include the URL http://www.mathworks.com/matlabcentral/answers/127189-colored-parentheses-by-nested-level in the message.
Accepted Answer
Image Analyst
on 25 Apr 2014
No - not yet, but I think it would be a good idea.
2 Comments
Elisabeth Wagner
on 18 Jan 2018
Edited: Elisabeth Wagner
on 18 Jan 2018
Is there now a possibility to highlight brackets?
Walter Roberson
on 18 Jan 2018
"Is there now a possibility to highlight brackets?"
The only differences in this respect since 2014 is that now the Live Script editor exists, and in Live Script when you click on (or position at) a bracket, then it briefly puts an underscore under both the bracket and its match, which is different from the regular editor only in that the brief underscore is slightly thicker and lasts slightly longer and so is a little more obvious than in the regular editor.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!