No description
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
【One-Line Pitch】
A practical manual for turning MATLAB functions into Excel add-ins and COM components that non-MATLAB users can call directly from spreadsheet formulas and macros. Best suited to MATLAB developers and IT/deployment engineers who need to ship numerical or plotting routines to Excel users without exposing the MATLAB environment.
【Book Arc】
- **Opening (~0%–10%)**: Establishes the deployment model — how MATLAB Compiler analyzes dependencies, packages functions, and produces a deployable archive — then walks through the basic "create an Excel add-in from MATLAB" workflow and a first test with a magic-square function.
- **Early (~10%–32%)**: Covers project customization (required files, support packages, sample drivers) and the Function Wizard, including defining input/output ranges, handling struct arrays, creating macros, and accessing the generated Visual Basic code.
- **Middle (~32%–48%)**: Moves into deployment mechanics: excluding files from packages, calling shared libraries, and integrating the compiled component into Excel via VBA, including class instances, method calls, and array-formatting flags.
- **Late (~48% onward)**: The excerpts thin out here; remaining material appears to address add-in integration details and error handling, but the excerpts do not cover the full late-book content.
【Key Takeaways】
- **Deployment is a packaging problem, not a coding problem** (Opening): MATLAB Compiler performs dependency analysis and bundles functions, data files, and MEX/DLL dependencies into a deployable archive; understanding this pipeline is the prerequisite for everything else.
- **Write deployment-safe MATLAB code** (Opening): Packaged applications do not process MATLAB files at run time, so avoid relying on path changes, nonconstant static state, or noncompilable functions; use `isdeployed` to branch deployment-specific logic.
- **The Library Compiler is the recommended path** (Early): Building add-ins from within the Function Wizard is deprecated starting R2020a; use the Library Compiler app or `compiler.build.excelAddIn` instead.
- **The Function Wizard remains useful for iterative testing** (Early): It lets you map MATLAB functions to Excel ranges, define struct-array inputs (element-by-element or plane organization), and debug before final packaging.
- **Excel integration runs through VBA and COM** (Middle): Compiled components are called from Visual Basic via class instances; array-formatting flags (`MWFlags`) control how Variants map to MATLAB matrices or cell arrays.
- **Range selection has a known pitfall** (Early): Avoid selecting ranges with arrow keys in Excel; a documented Microsoft fix is required if you do.
- **Distribution requires matching architecture and the MATLAB Runtime** (Opening): Build and deploy on compatible architectures, and decide whether to bundle the Runtime installer with your package.
【Reading Tips】
- **Skim the table of contents first** to locate the workflow that matches your task (new add-in vs. Function Wizard vs. VBA integration), then read only those chapters.
- **Deep-read the deployment chapter (Chapter 5)** if you are shipping to end users; the code-safety rules there prevent most runtime failures.
- **Treat the Function Wizard chapter as reference**, not a tutorial — it is long and procedural, and the feature is deprecated for new builds.
- **Keep the VBA/COM integration chapter handy** when writing macros; the array-formatting examples are the most reusable part.
- **Take away one working example** (e.g., the magic-square or `xlmulti` add-in) and adapt it rather than reading cover to cover.
【Coverage Limits】
This guide is based on stratified excerpts covering roughly the first half of the book; the late chapters on add-in integration and error handling are only partially represented, so details there may be incomplete.
Page 5
Applications . . . . . . . . . . . . . . . . . . . . . 5-13 Explicitly Including MATLAB Data files Using the %#function Pragma . . 5-13 Load and Save Functio...
View in text
Excerpt 2
bution. 3-5 Manage Support Packages Manage Support Packages Using a Compiler App Many MATLAB toolboxes use support packages to interact with hardware or to p...
View in text
Excerpt 3
field name. The Name you specify must match the field name of the structure array in your MATLAB function. b Specify the Range for the field. Caution Avoid s...
View in text
Excerpt 4
braries in the current project contain types named myclass. Using both CreateObject and New produce a dimensioned class instance. The first method does not r...
View in text
Excerpt 5
part, and spectral density. 7 Click OK to run the analysis. The following figure shows an example of the output. 7-19 8 Distribution to End Users • “Assign M...
View in text
Excerpt 6
g symbols. Example: 'DebugSymbols','On' Data Types: logical EmbedArchive — Flag to embed deployable archive 'on' (default) | on/off logical value Flag to emb...
View in text
Excerpt 7
Initialized stores the status of the initialization process. The private subroutine InitModule() creates an instance of the MWComUtil class and calls the MWI...
View in text
Excerpt 8
the array's dimensions unchanged. If you do not supply the varFieldNames argument, the existing list of fields is not changed. Calling Initialize with no arg...
View in text
Tags
AI categories
MatlabProgramming LanguageSoftware
Text Preview (First 20 pages)
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Generating text preview…
Loading comments...
Reply to Comment
Edit Comment