MATLAB: Is there any other way to code (|n1| |n2|) in matlab..? i couldnot code this single vertical bars ..? it is very simple to look the question but am stuck here.. if i come to know this i will solve the problem…

matlab codermatrix

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.

Best Answer

  • doc abs
    Matlab uses | as a logical operator, not in pairs to indicate absolute value (which practice is consonant with virtually all other common programming languages). Use the abs function...