وبلاگ بلیان

Python for MATLAB Development : Extend MATLAB with 300,000+ Modules From the Python Package Index

معرفی کتاب «Python for MATLAB Development : Extend MATLAB with 300,000+ Modules From the Python Package Index» نوشتهٔ Alan Melville و Albert Danial، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2022. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

MATLAB can run Python code! Python for MATLAB Development shows you how to enhance MATLAB with Python solutions to a vast array of computational problems in science, engineering, optimization, statistics, finance, and simulation. It is three books in one: * A thorough Python tutorial that leverages your existing MATLAB knowledge with a comprehensive collection of MATLAB/Python equivalent expressions * A reference guide to setting up and managing a Python environment that integrates cleanly with MATLAB * A collection of recipes that demonstrate Python solutions invoked directly from MATLAB This book shows how to call Python functions to enhance MATLAB's capabilities. Specifically, you'll see how Python helps MATLAB: * Run faster with numba * Distribute work to a compute cluster with dask * Find symbolic solutions to integrals, derivatives, and series summations with SymPy * Overlay data on maps with Cartopy * Solve mixed-integer linear programming problems with PuLP * Interact with Redis via pyredis, PostgreSQL via psycopg2, and MongoDB via pymongo * Read and write file formats that are not natively understood by MATLAB, such as SQLite, YAML, and ini Who This Book Is For MATLAB developers who are new to Python and other developers with some prior experience with MATLAB, R, IDL, or Mathematica. Table of Contents About the Author About the Technical Reviewers Preface Acknowledgments Chapter 1: Introduction 1.1 Learn Python Through MATLAB Equivalents 1.2 Is Python Really Free? 1.3 What About Toolboxes? 1.4 Why Python Won’t Replace MATLAB 1.5 Contents at a Glance 1.6 I Already Know Python. How Do I Call Python Functions in MATLAB? 1.7 The Recipes Don’t Work! MATLAB Crashes! (and What to Do About It) Chapter 2: Installation 2.1 Downloads 2.1.1 Match Your Python and MATLAB Versions! 2.1.2 Verify That Python Runs 2.2 Post-Install Configuration and Checkout 2.3 Creating and Running a Python Program 2.4 The Curse of Choice 2.5 Virtual Environments 2.5.1 matpy, the Virtual Environment Used in This Book 2.5.2 Commands to Manage Virtual Environments 2.5.3 Keeping Your Virtual Environment Current 2.6 ipython, IDEs 2.6.1 Autoload Modules When ipython Starts 2.7 Python and MATLAB Versions Used in This Book Chapter 3: Language Basics 3.1 Assignment 3.1.1 Assignment with = 3.1.2 In-Place Updates with +=, -=, and Others 3.1.3 Walrus Operator,:= 3.2 Printing 3.3 Indentation 3.3.1 Tabs 3.4 Indexing 3.4.1 Brackets vs. Parentheses 3.4.2 Zero-Based Indexing and Index Ranges 3.4.3 Start, End, and Negative Indices 3.4.4 Index Strides 3.4.5 Index Chaining 3.5 for loops 3.5.1 Early Loop Exits 3.5.2 Exit from Nested Loops 3.6 while Loops 3.7 if Statements 3.7.1 Boolean Expressions and Operators 3.7.2 Range Tests 3.8 Functions 3.8.1 Pass by Value and Pass by Reference 3.8.1.1 Scalars Are Passed by Value 3.8.1.2 Lists, Dicts, and Arrays Are Passed by Reference 3.8.1.3 List, Dict, and Array Contents Can Be Replaced in Their Entirety 3.8.2 Variable Arguments 3.8.3 Keyword Arguments 3.8.4 Decorators 3.8.5 Type Annotation and Argument Validation 3.8.6 Left-Hand Side Argument Count 3.9 Generators 3.9.1 yield, next() 3.9.2 range() 3.10 Scoping Rules and Global Variables 3.11 Comments 3.11.1 Docstrings 3.12 Line Continuation 3.13 Exceptions 3.14 Modules and Packages 3.14.1 Namespace 3.14.1.1 import X, or import X as Y 3.14.1.2 from X import Y 3.14.1.3 from X import Y as Z 3.14.1.4 An Antipattern: from X import * 3.14.2 def main() 3.14.3 Module Search Path 3.14.4 Installing New Modules 3.14.5 Module Dependency Conflicts and Virtual Environments Chapter 4: Data Containers 4.1 NumPy Arrays 4.2 Strings 4.2.1 Strings, Character Arrays, and Byte Arrays 4.2.2 String Operations 4.2.2.1 String Length 4.2.2.2 Append to a String 4.2.2.3 Repeat a String 4.2.2.4 Convert to Upper- or Lowercase 4.2.2.5 Replace Characters 4.2.2.6 Method Chaining 4.2.3 Formatting 4.2.4 Separate a String into Words 4.2.5 Tests on Strings 4.2.5.1 Testing for Equality 4.2.5.2 Check Trailing Characters 4.2.5.3 Check Starting Characters 4.2.5.4 Do Given Characters Appear in a String? 4.2.6 String Searching, Replacing with Regular Expressions 4.2.6.1 Does a String Match a Regex? 4.2.6.2 Match a Regex and Capture Substrings 4.2.6.3 Replace Text Matching a Regex with Different Text 4.2.7 String Templates 4.3 Python Lists and MATLAB Cell Arrays 4.3.1 Initialize an Empty List 4.3.2 Create a List with Given Values 4.3.3 Get the Length of a List 4.3.4 Index a List Item 4.3.5 Extract a Range of Items 4.3.6 Warning—Python Index Ranges Are Not Checked! 4.3.7 Append an Item 4.3.8 Append Another List 4.3.9 Preallocate an Empty List 4.3.10 Insert to the Beginning (or Any Other Position) of a List 4.3.11 Indexing Nested Containers 4.3.12 Membership Test: Does an Item Exist in a List? 4.3.13 Find the Index of an Item 4.3.14 Apply an Operation to All Items (List Comprehension) 4.3.15 Select a Subset of Items Based on a Condition 4.3.16 How Many Times Does an Item Occur? 4.3.17 Remove the First or Last (or Any Intermediate) List Item 4.3.18 Remove an Item by Value 4.3.19 Merging Multiple Lists 4.3.20 Unmerging Combined Lists 4.3.21 Sort a List 4.3.22 Reverse a List 4.4 Python Tuples 4.5 Python Sets and MATLAB Set Operations 4.6 Python Dictionaries and MATLAB Maps 4.6.1 Iterating over Keys 4.6.2 Testing for Key Existence 4.6.2.1 get() and .setdefault() 4.6.2.2 Key Collision 4.6.3 Iterating over Keys, Sorting by Key 4.6.4 Iterating over Keys, Sorting by Value 4.6.4.1 Secondary Sorts 4.6.5 Tuples As Keys 4.6.6 List Values 4.7 Structured Data 4.7.1 Method 1: namedtuple 4.7.2 Method 2: SimpleNamespace 4.7.3 Method 3: Classes 4.7.4 Method 4: Data Classes 4.7.4.1 Field Values 4.7.4.2 Relationships Between Dependent Data Classes 4.7.4.3 Dynamic Modification of Data Classes 4.7.4.4 Traversing Linked Data Classes 4.7.4.5 Type Validation with Pydantic 4.7.5 Enumerations 4.8 Caveat: “=” Copies a Reference for Nonscalars! Chapter 5: Dates and Times 5.1 Time 5.1.1 Current Time 5.1.2 Time String Formats 5.1.3 tic, toc; %timeit 5.2 Dates 5.2.1 datetime Objects to and from Strings 5.2.2 Time Deltas 5.3 Timezones 5.3.1 UTC vs. Local Time 5.4 Time Conversions to and from datetime Objects 5.4.1 Unix Epoch Seconds 5.4.2 ISO 8601 Time String 5.4.3 Julian Date; Modified Julian Date; GPS Time 5.5 zoneinfo in Python >= 3.9 5.5.1 List Available Timezones 5.5.2 Date Increments Across Daylight Savings Transition 5.6 References Chapter 6: Call Python Functions from MATLAB 6.1 Configure MATLAB to Recognize Python 6.2 Does It Work? 6.3 Importing (and Reloading) Python Modules 6.4 Configure startup.m for Python Work 6.5 Create Python Variables and Call Python Functions in MATLAB 6.5.1 Scalars 6.5.2 Lists and Cell Arrays 6.5.3 Tuples 6.5.4 Numeric Arrays 6.5.5 Dictionaries and Structs 6.5.6 Keyword Arguments 6.5.7 Python-to-MATLAB and MATLAB-to-Python Variable Converters 6.5.8 Traversing Generators 6.5.9 Traversing zip() 6.6 Modifying the Python Search Path Within MATLAB 6.6.1 Extending sys.path with an Alias 6.6.2 Extending sys.path with insert() 6.6.3 Extending sys.path with append() 6.7 Python Bridge Modules 6.8 Debugging Python Code Called by MATLAB 6.9 Summary of Steps to Calling Python Code from MATLAB 6.10 Call MATLAB from Python 6.10.1 Install matlab.engine 6.10.2 Call Functions in a New MATLAB Session 6.10.3 Call Functions in an Existing MATLAB Session 6.11 Other Mechanisms for MATLAB/Python Interaction 6.11.1 System Calls and File I/O 6.11.1.1 JSON 6.11.1.2 MATLAB to Python via JSON 6.11.1.3 Python to MATLAB via JSON 6.11.2 TCP/IP Exchange Chapter 7: Input and Output 7.1 Text Files 7.1.1 Reading Corrupted Text Files with pathlib 7.1.2 Reading and Writing Numeric Data 7.1.3 I/O Exceptions 7.1.4 Parsing Text 7.1.4.1 Stripping Whitespace 7.1.4.2 Splitting a String with a Substring 7.1.4.3 Regular Expressions 7.1.4.4 Splitting a String with a Regex 7.1.4.5 Searching a String for Patterns 7.1.5 csv 7.1.5.1 Python’s csv Module 7.1.5.2 Pandas’s read csv() Function 7.1.5.3 NumPy’s genfromtxt() Function 7.1.6 XML 7.1.6.1 XML Without Namespaces 7.1.6.2 XML with Namespaces 7.1.6.3 Writing XML 7.1.6.4 Pretty-Printing XML 7.1.7 YAML 7.1.8 JSON 7.1.9 ini 7.2 Recipe 7-1: Read YAML Files 7.3 Recipe 7-2: Write YAML Files 7.4 Recipe 7-3: Read an ini File 7.5 Recipe 7-4: Write an ini File 7.6 Binary Files 7.7 Excel .xls, .xlsx 7.7.1 Reading .xls and .xlsx Files 7.7.1.1 Get Worksheet Names 7.7.1.2 Get a Worksheet’s Size 7.7.1.3 Extract Rows 7.7.1.4 Extract Columns 7.7.1.5 Extract a Rectangular Block 7.7.2 Writing .xlsx Files 7.8 Recipe 7-5: Write an .xlsx File 7.9 HDF5 7.9.1 Reading an HDF5 File 7.9.2 Writing an HDF5 File 7.9.2.1 Abbreviated Writing Notation 7.9.2.2 Beware: MATLAB’s h5read(), h5write() Transpose Matrices 7.9.3 Reading and Writing HDF5 Dataset Attributes 7.9.4 Iterating over All HDF5 Datasets 7.10 NetCDF4 7.10.1 Reading a NetCDF4 File 7.10.1.1 Reading NetCDF4 Attributes 7.11 SQLite 7.12 Recipe 7-6: CRUD with an SQLite Database 7.13 Pickle Files 7.14 MATLAB .mat Files 7.14.1 Inspecting the Contents of a .mat File 7.14.2 Reading a .mat File 7.14.3 Writing a .mat File 7.14.3.1 Writing Cell Arrays 7.14.3.2 Writing an Array of Structs 7.14.4 mat Version 7.3 7.15 Command-Line Input 7.15.1 Python: sys.argv 7.15.2 MATLAB: Function Arguments; varargin 7.15.3 Python: argparse 7.16 Interactive Input 7.17 Receiving and Sending over a Network 7.17.1 HTTP, HTTPS 7.17.2 Python As a Web Server 7.17.3 TCP/IP 7.17.3.1 Python Client 7.17.3.2 Python Server 7.17.3.3 MATLAB Client 7.17.3.4 MATLAB Server 7.18 Recipe 7-7: TCP Server 7.19 Interacting with Databases 7.19.1 PostgreSQL 7.19.2 MongoDB 7.20 Recipe 7-8: CRUD with a PostgreSQL Database 7.21 Recipe 7-9: CRUD with a MongoDB Database 7.21.1 Read 7.21.2 Update 7.21.3 Delete 7.22 Recipe 7-10: Interact with Redis 7.23 Reference Chapter 8: Interacting with the File System 8.1 Reading Directory Contents 8.2 Finding Files 8.3 Deleting Files 8.4 Creating Directories 8.5 Deleting Directories 8.6 Walking Directory Trees Chapter 9: Interacting with the Operating System and External Executables 9.1 Reading, Setting Environment Variables 9.2 Calling External Executables 9.2.1 Checking for Failures 9.2.2 A Bytes-Like Object Is Required 9.3 Inspecting the Process Table and Process Resources Chapter 10: Object-Oriented Programming 10.1 Classes 10.1.1 Private vs. Public 10.1.2 Custom Printers 10.1.3 Custom Exceptions 10.2 Performance Implications Chapter 11: NumPy and SciPy 11.1 NumPy Arrays 11.1.1 Formatting NumPy Array Values 11.1.2 Differences Between NumPy Arrays and MATLAB Matrices 11.1.2.1 MATLAB Matrices Made of Numeric Literals Default to Double Precision 11.1.2.2 MATLAB Matrices Have a Minimum of Two Dimensions 11.1.2.3 MATLAB Numeric Scalars Are 1 x 1 Matrices 11.1.2.4 NumPy Arrays Are Row Major 11.1.2.5 NumPy Arrays Must Be Explicitly Resized to Add Terms 11.1.3 NumPy Data Types 11.1.4 Typecasting Scalars and Arrays 11.1.5 Hex, Binary, and Decimal Representations 11.1.5.1 Decimal to Binary 11.1.5.2 Binary to Decimal 11.1.5.3 Decimal to Hexadecimal 11.1.5.4 Hexadecimal to Decimal 11.1.6 Creating Arrays 11.1.6.1 Zeros 11.1.6.2 Ones 11.1.6.3 NaNs 11.1.6.4 Range 11.1.6.5 Identity 11.1.6.6 Diagonal Matrices 11.1.6.7 Upper and Lower Triangular Matrices 11.1.6.8 Random 11.1.6.9 Equally Spaced Distribution (linspace) 11.1.6.10 Logarithmically Spaced Distribution (logspace) 11.1.6.11 Horizontal and Vertical Stacking 11.1.6.12 Meshgrid 11.1.6.13 Inflating Matrices 11.1.6.14 Test Matrices 11.1.7 Complex Scalars and Arrays 11.1.8 Linear Indexing 11.1.9 Reading/Writing Arrays to/from Text Files 11.1.9.1 Reading an Array from a Text File 11.1.9.2 Writing an Array to a Text File 11.1.10 Reading/Writing Arrays to/from Binary Files 11.1.10.1 Reading a Raw Array from a Binary File 11.1.10.2 Writing a Raw Array to a Binary File 11.1.10.3 Writing Arrays to a Binary File with Metadata 11.1.10.4 Reading Arrays from a Binary File 11.1.10.5 Endian Conversions 11.1.11 Primitive Array Operations 11.1.11.1 Addition, Subtraction 11.1.11.2 Elementwise Operations 11.1.11.3 Bitwise Operations 11.1.11.4 Transpose and Hermitian Operations 11.1.11.5 Array Multiplication 11.1.12 Adding Dimensions 11.1.13 Array Broadcasting 11.1.13.1 Broadcasting Requires More Memory 11.1.13.2 Broadcasting Example 1: Normalize Vectors 11.1.13.3 Broadcasting Example 2: The Distance Matrix 11.1.14 Index Masks 11.1.14.1 Creating Index Masks 11.1.14.2 Using Index Masks 11.1.15 Extracting and Updating Submatrices 11.1.16 Finding Terms of Interest 11.1.16.1 Find the Smallest Term 11.1.16.2 Find the Largest Term 11.1.16.3 Find Term Nearest a Given Value 11.1.16.4 Find Term Nearest a Given Value in a Sorted 1D Array 11.1.16.5 Find Indices of Terms Satisfying a Condition 11.1.17 Object-Oriented Programming and Computational Performance 11.2 Linear Algebra 11.2.1 Linear Equations 11.2.1.1 Ax = b 11.2.2 Singular Value Decomposition 11.2.3 Eigenvalue Problems 11.3 Sparse Matrices 11.3.1 Sparse Matrix Creation with COO, CSC, CSR 11.3.1.1 Repeated COO Indices 11.3.1.2 Extracting Indices and Values 11.3.1.3 Compressed Row, Column Storage 11.3.2 Sparse Matrix Creation with LIL, DOK 11.3.3 Sparse Matrix Creation with BSR, DIA 11.3.4 Test Matrices 11.3.4.1 Random Sparse 4 × 3 Arrays with Density of 40% 11.3.4.2 Random Sparse via I,J,V 11.3.4.3 Arrow Matrix 11.3.5 Sparse Matrix I/O 11.3.5.1 Write to MATLAB .mat Files 11.3.5.2 Write Component Parts As NumPy Arrays 11.3.5.3 Write a Python Pickle Object 11.3.6 Linear Algebra 11.3.7 Summary of Sparse Formats and Capabilities; Recommendations 11.4 Interpolation 11.4.1 One-Dimensional Interpolation 11.4.1.1 One-Dimensional Linear Interpolation 11.4.1.2 One-Dimensional Spline Interpolation 11.4.2 Two-Dimensional Interpolation 11.4.3 Two-Dimensional Interpolation on a Grid 11.5 Curve Fitting 11.5.1 Linear Regression 11.5.2 Fitting Higher-Order Polynomials 11.5.3 Fitting to Models 11.5.3.1 Case 1: Logarithmic Growth 11.5.3.2 R2 to Score the Solution 11.5.3.3 Fitting Logarithmic Growth with curve_fit() 11.5.3.4 Case 2: Sinusoidal Decay 11.5.3.5 Fitting Sinusoidal Decay with curve_fit() 11.5.3.6 Fitting Sinusoidal Decay with differential_evolution() 11.6 Recipe 11-1: Curve Fitting with differential_evolution() 11.7 Regression 11.7.1 Ordinary Least Squares 11.7.2 Weighted Least Squares 11.7.3 Confidence and Prediction Intervals 11.8 Recipe 11-2: Weighted Least Squares in MATLAB 11.9 Recipe 11-3: Confidence and Prediction Intervals in MATLAB 11.10 Finding Roots 11.10.1 Univariate 11.10.2 Multivariate 11.11 Recipe 11-4: Solving Simultaneous Nonlinear Equations 11.12 Optimization 11.12.1 Linear Programming 11.12.1.1 SciPy linprog() 11.12.1.2 PuLP 11.12.2 Simulated Annealing 11.13 Differential Equations 11.14 Symbolic Mathematics 11.14.1 Defining Symbolic Variables 11.14.2 Derivatives 11.14.3 Integrals 11.14.4 Solving Equations 11.14.5 Linear Algebra 11.14.5.1 Perform a Symbolic LU Factorization of 11.14.5.2 Symbolically Solve Ax = b 11.14.6 Series 11.15 Recipe 11-5: Using SymPy in MATLAB 11.16 Recipe 11-6: Compute Laplace Transforms 11.17 Unit Systems 11.17.1 Defining Units in pint 11.18 Recipe 11-7: Using pint in MATLAB 11.19 References Chapter 12: Plotting 12.1 Point and Line Plots 12.1.1 Saving Plots to Files 12.1.2 Multiple Plots per Figure 12.1.3 Date and Time on the X Axis 12.1.4 Double Y Axes 12.1.5 Histograms 12.1.6 Stack Plots 12.2 Area Plots 12.2.1 imshow() 12.3 Animations 12.4 Plotting on Maps with Cartopy 12.4.1 Points 12.4.2 Lines 12.4.3 Area 12.4.3.1 Sea Surface Temperature 12.4.3.2 South American Wheat Production, 2014 12.4.4 MATLAB and Cartopy 12.4.5 Avoid matplotlib’s Qt Backend in MATLAB! 12.5 Recipe 12-1: Drawing Lines on Maps with Cartopy 12.6 Recipe 12-2: Overlay Contours on Globe with Cartopy 12.7 Recipe 12-3: Shade Map Regions by Value with Cartopy 12.8 Plotting on Maps with GeoPandas 12.9 Making Plots in Batch Mode 12.10 Interactive Plot Editing Chapter 13: Tables and Dataframes 13.1 Loading Tables from Files 13.2 Table Summaries 13.2.1 Table Size, Column Names, Column Types 13.2.2 summary() and .info()/.describe() 13.2.3 groupsummary() and .value_counts() 13.2.4 head() and tail() 13.3 Cleaning Data 13.3.1 Renaming Columns 13.3.2 Changing Column Data Types 13.3.3 Changing Column Data 13.3.4 Making Timestamps from Strings 13.4 Creating Tables Programmatically 13.5 Sorting Rows 13.6 Table Subsets 13.6.1 All Rows, Selected Columns 13.6.2 All Columns, Selected Rows 13.6.3 Selected Rows, Selected Columns 13.6.4 Filter Rows by Conditional Operations 13.7 Iterating over Rows 13.8 Pivot Tables 13.8.1 Single-Level Aggregation 13.8.2 Multilevel Aggregation 13.9 Adding Columns 13.10 Deleting Columns 13.11 Joins Across Tables 13.12 GeoPandas 13.13 Recipe 13-1: Maps with GeoPandas 13.14 References Chapter 14: High Performance Computing 14.1 Paths to Faster Python Code 14.2 Reference Problems 14.2.1 The Mandelbrot Set 14.2.2 A 2D Finite Element Solver 14.3 Reference Hardware and OS 14.4 Baseline Performance 14.4.1 Mandelbrot Set Performance 14.4.2 FE Solver Performance 14.5 Profiling Python Code 14.5.1 Scalene 14.5.2 Austin and FlameGraph 14.6 Multicore Computation with multiprocessing 14.7 Vectorization 14.8 Cython 14.8.1 Python Compiled with Cython 14.8.2 Parallel for Loops with Cython 14.8.3 Cython Performance 14.9 Pythran 14.9.1 Examples of Signature Comments 14.9.2 Python Compiled with Pythran; Parallel for Loops 14.9.3 Pythran Performance 14.10 Numba 14.10.1 Parallel for Loops with Numba 14.10.2 Numba Keyword Arguments nopython, fastmath 14.10.3 Numba Performance 14.10.4 Numba Limitations 14.11 f2py 14.12 Recipe 14-1: Accelerating MATLAB with Python on a Single Computer 14.12.1 Compile Python Modules in a MATLAB-Friendly Virtual Environment 14.12.2 MATLAB + Cython 14.12.3 MATLAB + Pythran 14.12.4 MATLAB + Numba 14.12.5 MATLAB + f2py 14.12.6 MATLAB + Python Performance Results 14.13 Distributed Memory Parallel Processing with Dask 14.13.1 Parallel MATLAB 14.13.2 Dask Execution Paradigm and Performance Expectations 14.13.3 Example 1: Sum of Prime Factors on One Computer 14.13.4 Setting Up a Dask Cluster on Multiple Computers 14.13.5 Example 2: Sum of Prime Factors on Multiple Computers 14.13.6 Example 3: A Gigapixel Mandelbrot Image 14.13.7 Example 4: Finite Element Frequency Domain Response 14.13.7.1 A Notional Satellite Model 14.13.7.2 An Outline of the Problem 14.13.7.3 Sending Large Inputs to Remote Computers 14.13.7.4 Subdividing Work to Minimize Data Movement 14.13.7.5 Subsetting Results from the Remote Computers 14.13.7.6 A Parallel Solver Module 14.13.7.7 Running on Coiled’s Cloud 14.13.7.8 Performance and Cost on Coiled’s Cloud 14.14 Recipe 14-2: Accelerating MATLAB with Python on Multiple Computers 14.14.1 Parallel Prime Sums with MATLAB 14.14.2 Parallel Gigapixel Mandelbrot with MATLAB 14.14.3 Parallel Direct Frequency Response with MATLAB 14.15 References Chapter 15: Language Pitfalls 15.1 Troublesome Language Features 15.2 MATLAB 15.3 Python Appendix A: MATLAB/Python Recipe Index Appendix B: Generating Sample Data with Faker Appendix C: Finite Element Source Listing Appendix D: Python-to-MATLAB and MATLAB-to- Python Variable Converters Appendix E: A Utility to Patch Cartopy to Use requests Index MATLAB can run Python code! Python for MATLAB Development shows you how to enhance MATLAB with Python solutions to a vast array of computational problems in science, engineering, artificial intelligence, statistics, finance, and simulation. It is three books in one: A thorough Python tutorial that leverages your existing MATLAB knowledge with a comprehensive collection of MATLAB/Python equivalent expressions A reference guide to setting up and managing a Python environment that integrates cleanly with MATLAB A collection of recipes that demonstrate Python solutions invoked directly from MATLAB The demonstrated techniques and explanations will help you solve your own challenging problems in MATLAB using open source Python modules. Python is the ultimate MATLAB Toolbox and this book is your guide to its use. You will: Find symbolic solutions to integrals, derivatives, and series summations with SymPy Overlay data on maps with Cartopy Solve mixed-integer linear programming problems with PuLP Accelerate computationally-intensive tasks with numba Run large computations in parallel with dask Interact with Redis via pyredis, PostgreSQL via psycopg2, and MongoDB via pymongo Read and write file formats that are not natively understood by MATLAB, such as SQLite, YAML, and ini
دانلود کتاب Python for MATLAB Development : Extend MATLAB with 300,000+ Modules From the Python Package Index