MATLAB Programming Fundamentals - MathWorks

MATLAB Programming Fundamentals - MathWorks: In this post, we will talk about explaining the basics of MATLAB.




MATLAB Programming Fundamentals - MathWorks

Contents

  1. Syntax Basics
  2. Program Components
  3. Overview of MATLAB Classes
  4. Numeric Classes
  5. The Logical Class
  6. Characters and Strings
  7. Dates and Time
  8. Categorical Arrays
  9. Tables
  10. Timetables
  11. Structures
  12. Cell Arrays
  13. Function Handles
  14. Map Containers
  15. Combining Unlike Classes
  16. Using Objects
  17. Defining Your Own Classes
  18. Scripts
  19. Live Scripts
  20. Function Basics
  21. Function Arguments
  22. Debugging MATLAB Code
  23. Presenting MATLAB Code
  24. Coding and Productivity Tips
  25. Programming Utilities
  26. Error Handling
  27. Program Scheduling
  28. Performance
  29. Memory Usage
  30. Custom Help and Documentation
  31. Source Control Interface
  32. Unit Testing
  33. System object Usage and Authoring.

Syntax Basics:

  • Continue Long Statements on Multiple Lines
  • Call Functions
  • Gnore Function Outputs
  • Variable Names
  • Case and Space Sensitivity
  • Command vs. Function Syntax
  • Common Errors When Calling Functions.

  • Continue Long Statements on Multiple Lines

This example shows how to continue a statement to the next line using ellipsis (...).

s = 1 - 1/2 + 1/3 - 1/4 + 1/5 ...
         - 1/6 + 1/7 - 1/8 + 1/9;

Build a long character vector by concatenating shorter vectors together:

mytext = ['Accelerating the pace of ' ... 
         'engineering and science'];

The start and end quotation marks for a character vector must appear on the same line.
For example, this code returns an error, because each line contains only one quotation mark:

mytext   =    'Accelerating the pace of ...
                         engineering and science'

An ellipsis outside a quoted text is equivalent to a space. For example,

x = [1.23...
4.56];

is the same as

x = [1.23 4.56];


DOWNLOAD also Data Analysis with Microsoft Excel