Filter löschen
Filter löschen

use of modulus in matlab

8 Ansichten (letzte 30 Tage)
Patel jaykumar Dipakbhai
Patel jaykumar Dipakbhai am 3 Feb. 2020
hello, i am trying two build a code in which i am using a formula which has difference between two quantities , but sometimes the difference between two can lead to a negative integer and i want to make it positive always as the output (like a modulus functon which when used returns non negative integres)
how can i do this in matlab"??
like can i use as .... X = | X2 -Y2 | ?
  2 Kommentare
Geoff Hayes
Geoff Hayes am 3 Feb. 2020
Patel - perhaps you could use abs.
Patel jaykumar Dipakbhai
Patel jaykumar Dipakbhai am 3 Feb. 2020
Thanks a lot sir

Melden Sie sich an, um zu kommentieren.

Antworten (1)

fred  ssemwogerere
fred ssemwogerere am 3 Feb. 2020
Please refer to the matlab documentation in your version of the software and search for: "abs". Alternatively refer to:
  1 Kommentar
Patel jaykumar Dipakbhai
Patel jaykumar Dipakbhai am 3 Feb. 2020
Thankyou very much.. I got the required syntax

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by