Skip to Main Content
Programming in MATLAB ®: A Problem-Solving Approach by Pearson
book

Programming in MATLAB ®: A Problem-Solving Approach by Pearson

by Ram N. Patel, Ankush Mittal
May 2024
Intermediate to advanced content levelIntermediate to advanced
433 pages
13h 7m
English
Pearson India
Content preview from Programming in MATLAB ®: A Problem-Solving Approach by Pearson
260 Ñ Efficient Coding Using Vectorization Technique
A vectorized version for computing z would be as follows:
z = sin(x - y);
In addition to writing your code in vectorized form, if your program satisfies the criteria of
MATLAB Just-In-Time (JIT) accelerator, it can execute as fast as a C program. This chapter
presents some basic concepts for writing efficient MATLAB codes. As we would observe in
this chapter, generally the code written using these techniques is faster, less prone to errors, and
easier to understand. The vector concepts discussed here would prove handy if you plan to use
MATLAB for serious programming applications.
Several concepts in this chapter are illustrated through various examples. Some of the con-
cepts might not be straightforward ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Applied Numerical Methods Using MATLAB, 2nd Edition

Applied Numerical Methods Using MATLAB, 2nd Edition

Won Y. Yang, Wenwu Cao, Jaekwon Kim, Kyung W. Park, Ho-Hyun Park, Jingon Joung, Jong-Suk Ro, Han L. Lee, Cheol-Ho Hong, Taeho Im
MATLAB Recipes: A Problem-Solution Approach

MATLAB Recipes: A Problem-Solution Approach

Michael Paluszek, Stephanie Thomas
Practical MATLAB Deep Learning: A Projects-Based Approach

Practical MATLAB Deep Learning: A Projects-Based Approach

Michael Paluszek, Stephanie Thomas, Eric Ham

Publisher Resources

ISBN: 9781306983440Publisher Website