Hitesh Sahu
Hitesh SahuHitesh Sahu
  1. Home
  2. โ€บ
  3. posts
  4. โ€บ
  5. โ€ฆ

  6. โ€บ
  7. 2 2 Operators

Loading โณ
Fetching content, this wonโ€™t take longโ€ฆ


๐Ÿ’ก Did you know?

๐ŸŒ Bananas are berries, but strawberries are not.

๐Ÿช This website uses cookies

No personal data is stored on our servers however third party tools Google Analytics cookies to measure traffic and improve your website experience. Learn more

Loading โณ
Fetching content, this wonโ€™t take longโ€ฆ


๐Ÿ’ก Did you know?

๐Ÿฆฅ Sloths can hold their breath longer than dolphins ๐Ÿฌ.
AI-Math

    AI-AgenticAI

    AI-DeepLearning

    AI-GenAI

    AI-Infrastructure

    AI-Machine-Learning

    AI-Math
    • Advance Maths for Machine Learning

    • Algebra for Notation and Geometry

    • ๏ธAdvance MultiVariant Linear Algebra

    • MATLAB Fundamentals

    • MATLAB Operators

    • MATLAB Control Flow & Logic

    • MATLAB Object-Oriented Programming (OOP)

    • MATLAB Plotting & Visualization

    • AI-Math Index


    AWS

    Azure

    Hobbies

    kubernetes

    Management

    Programming

    Terraform

    Z_Appendix

    0-root

Cover Image for MATLAB Operators
AI-Math

MATLAB Operators

Detailed overview of MATLAB operators including arithmetic, relational, logical, matrix, and element-wise operations with practical examples for numerical computing.

MATLAB
Operators
Matrix Operations
Numerical Computing
Linear Algebra
Programming Basics
โ† Previous

MATLAB Fundamentals

Next โ†’

MATLAB Object-Oriented Programming (OOP)

MatLab Operators

Operators๐Ÿ“ˆ Overview

  • Arithmetic Operations
  • Relational Operations
  • Logical Operations
  • Set Operations
  • Bit-Wise Operations

Arithmetic Operators

+, -, *, /, ^, ()

Order of Operation

() > ^ > *, / > +-

Notes:

  • A*b multiply all elements of A with scalar b

A^n

A to the power n

A.^n

Multiply Each Element of Vector by nth power

A.*B

Multiply Consecutive elements of Matrix A & B

Matrix multiplication (A*B )

Given two Matrix A(mXn)A(mXn)A(mXn) & B(nXo)B(nXo)B(nXo) then Aโˆ—B=C(mโˆ—o)A*B = C(m*o)Aโˆ—B=C(mโˆ—o) matrix Where C(i,j)=A(i,k)โˆ—B(k,j)C(i,j)= A(i,k)*B(k,j)C(i,j)=A(i,k)โˆ—B(k,j)

Dot product/ Inner Product of Vector(A.B)

RowVector(1n) Column Vector(n1) = Scalar()11

Outer Product of Vector (AโŠ—B)

Column Vector(n1) RowVector(1n) = Matrix(nn)

RightDivide (./)

A./B : divide all elements of A with corresponding elements of B

A./b : divide all elements of A with vector b

Left Divide (.)

A.\B : divide all elements of B with corresponding elements of A

b.\B : divide all elements of B with vector b


Relational Operators

<, > , <=, >=, ==, ~=

  • A>B - return array of 1,0 by comparing each elements of A with B -A*b - return array of 1,0 by comparing each elements in A & b

Complex Numbers

  • >, <, >= <= compare only the real part
  • == , ~= test both real and imaginary parts.
Undefined values:
  • Inf == other Inf values. -NaN ~= numeric value, including other NaN values.
  • NaT ~= datetime value, including other NaT values.
  • Undefined ~= any other categorical value, including other undefined elements.

Logical Operators

  • Assert: true, false
  • Logic : |, &, ~, xor
  • Short Circuit: ||, &&,
  • Logical : islogical, logical
  • find, all, any
  x = v1(v1<4 & v1>2)
  x = all value of v1 between 2 & 4

  • L = logical(A) converts A into an array of logical values.
  • Any nonzero element of A is converted to logical 1 (true) and zeros are converted to logical 0 (false).
  • Complex values and NaNs cannot be converted to logical values and result in a conversion error.
Hitesh Sahu
Written by Hitesh Sahu, a passionate developer and blogger.

Wed Feb 25 2026

Share This on

โ† Previous

MATLAB Fundamentals

Next โ†’

MATLAB Object-Oriented Programming (OOP)

AI-Math/2-2-Operators
Let's work together
+49 176-2019-2523
hiteshkrsahu@gmail.com
WhatsApp
Skype
Munich ๐Ÿฅจ, Germany ๐Ÿ‡ฉ๐Ÿ‡ช, EU
Playstore
Hitesh Sahu's apps on Google Play Store
Need Help?
Let's Connect
Navigation
ย  Home/About
ย  Skills
ย  Work/Projects
ย  Lab/Experiments
ย  Contribution
ย  Awards
ย  Art/Sketches
ย  Thoughts
ย  Contact
Links
ย  Sitemap
ย  Legal Notice
ย  Privacy Policy

Made with

NextJS logo

NextJS by

hitesh Sahu

| ยฉ 2026 All rights reserved.