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...

조회 수: 3 (최근 30일)
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
dpb
dpb 2017년 2월 2일
@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.

댓글을 달려면 로그인하십시오.

채택된 답변

dpb
dpb 2017년 2월 1일
편집: dpb 2017년 2월 1일
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...
  댓글 수: 3
Walter Roberson
Walter Roberson 2017년 2월 1일
My thought is that there is an implicit multiplication happening there.
dpb
dpb 2017년 2월 1일
@Jan -- the consonance of which I was speaking was using a functional form for absolute value rather than paired punctuation, not the actual name for the function in any given language.
@ Walter -- possibly may be going along with it but the plaintive cry about the vertical bar made me think OP was trying to copy a math text expression into Matlab literally. If need to also multiply then that'd be required to be explicitly written, too, fur shure...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by