Is there any other way to code (|n1| |n2|) in matlab..? i couldnot code this single vertical bars ..? it is very simple to look my question but am stuck here.. if i come to know this i will solve my problem...
Show older comments
Is there any other way to code (n1 |n2|) in matlab..? i could not code this single vertical bars ..? it is very simple to look my question but am stuck here.. if i come to know this i will solve my problem.
6 Comments
dpb
on 1 Feb 2017
Huh. Never knew that...
@dpb: ;-) It drives me mad, that the forum cannot display characters correctly after all these years. Do you understand, why this:
(|n1| |n2|)
is display as (n1 n2) when it appears in the text? Inserting a space after the parenthesis helps: ( n1 n2 ) - now both are displayed wrong :-[ . HTML helps: (|n1| |n1|) . This is: |n1| Brrrr.
Walter Roberson
on 1 Feb 2017
The | is treated as triggering monospace only if the | is not immediately preceded by a graphic character, and it is immediately followed by a graphic character, and the balancing | is not immediately followed by an alphanumeric character.
"not immediately preceded by a graphics character" meaning that it has to be preceded by whitespace or beginning of line.
"not immediately followed by an alphanumeric character" meaning that it has to be followed by whitespace or end of line or any of the special symbols, but not by the letters or digits.
The case of || is handled as a | followed by a graphics character (that is, can turn on monospace) rather than as | preceded by a graphics character.
In (n1 |n2|) the first | is preceded by a graphics character so it is treated literally. The second | is followed by whitespace so it is treated literally. The | before n2 is preceded by whitespace so it can trigger monospace. The ) after |n2| is followed by a non-alphanumeric is it is permitted to be the turn-off of monospace.
dpb
on 2 Feb 2017
@Jan -- I've given TMW uncountable grief over the forum interface to the point I'm resigned they don't care... :( And, I suppose, they're right as long as we continue to come back and put up with it.
Stephen23
on 2 Feb 2017
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown 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!