Hitesh Sahu
Hitesh SahuHitesh Sahu
  1. Home
  2. ›
  3. posts
  4. ›
  5. …

  6. ›
  7. 4 OOPS

Loading ⏳
Fetching content, this won’t take long…


💡 Did you know?

🐙 Octopuses have three hearts and blue blood.

🍪 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

Cover Image for MATLAB Object-Oriented Programming (OOP)

MATLAB Object-Oriented Programming (OOP)

Introduction to object-oriented programming in MATLAB including classes, properties, methods, constructors, inheritance, encapsulation, and practical examples.

Hitesh Sahu
Written by Hitesh Sahu, a passionate developer and blogger.

Wed Feb 25 2026

Share This on

MatLab Programming

Functions

Single Output function


   function out =fnName(param1, param 2...)
    ...body
    end  
    

Multi Output function


   function [out1, out2, ..] =fnName(param1, param 2...)
     ...body  
    end   

eg:

  function y = squareThisNumber(x)
  y= x^2
  
  // Multiple Output
  function [y1,y2] = squareAndCubeThisNumber(x)
  y1= x^2
  y2= x^3

Anonymous function

  • Returns only single output

  • Can be pass as input to other function

  • f is called Function Handle

    f = @(params..) expression

MatLab/4-OOPS
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.