MATLAB - MathWork Troubleshooting
MATLAB - MathWork Troubleshooting

Installation Troubleshooting
In the MATLAB Current Folder window, select a folder outside the MATLAB root folder ... Note During the build process, Simulink Coder does not allow files to be saved within the MATLAB tree root ... If you select a current folder within the MATLAB tree, the xPC Target test procedure fails when trying to build a target application ... On 64-bit computers, use the MATLAB command-line interface

Troubleshooting Linearization
If you do not get good linearization results, use the Linear Analysis Tool's troubleshooting tools ... You may also use Linearization result details for troubleshooting ... Blocks that are located near discontinuous regions, such as S-Functions, MATLAB function blocks, or lookup tables, are sensitive to numerical perturbation levels ... Troubleshooting the linearization of large models is

Troubleshooting Export Problems
If you generate a SimMechanics model from the XML file, these errors reappear as MATLAB command line warnings ... Selecting this menu item opens the online SimMechanics Link help in MATLAB ... Troubleshooting Assembly Export Failures ... Troubleshooting Assembly Export Failures

General xPC Target Troubleshooting
From the host computer, you can view the target computer monitor with the MATLAB xpctargetspy command ... For example, see the Disabling SMIs on Intel ICH5 Chipsets document at MATLAB Central for a solution to disable SMIs in the Intel ® ICH5 family ... Run xpcbench at the MATLAB command line ... For further information and test models, see the xPC Target CPU Overloads document at MATLAB

Troubleshooting MEX-Files
On Windows systems, if you move the MATLAB executable without reinstalling the MATLAB software, you might need to modify mex.bat to point to the new MATLAB location ... If you have problems building MEX-files on Windows systems and there is a space in any of the folder names within the MATLAB path, either reinstall MATLAB into a path name that contains no spaces or rename the folder

Troubleshooting Imported and Updated Models
Errors in the Physical Modeling XML file appear as warnings at the MATLAB command line during model generation ... For SimMechanics problems, see Troubleshooting Simulation Errors in the SimMechanics User's Guide ... Controlling Mechanical Import to Assist Troubleshooting ... Troubleshooting Errors During Model Generation ... Troubleshooting Errors During Model Update ... Troubleshooting Model

Installation, Configuration, and Build Troubleshooting
This topic assumes that you have read Installation Troubleshooting in the xPC Target Getting Started Guide ... Use the PC MATLAB command to check the environment variables, in particular Target PC IP address ... On 64-bit computers, use the MATLAB command-line interface ... At the MATLAB prompt, start xPC Target Explorer ... At the MATLAB command line, refer to and read the xpc reference page

pmode Troubleshooting
For more information about Admin Center, including how to start it and how to test connectivity, see Admin Center in the MATLAB Distributed Computing Server documentation ... If a lab cannot resolve the hostname of the computer running the MATLAB client, use pctconfig to change the hostname by which the client machine advertises itself ... If a lab cannot open a socket connection to the

MATLAB Compiler
However, it is possible that you may run into some difficulty with MATLAB Compiler ... A good source for additional troubleshooting information for the product is the MATLAB Compiler Product Support page at the MathWorks Web site ... This error occurs when a customer has both the R13 and the R14 version of MATLAB or MCR/MGL specified in the folder path and the R14 version fails to load

MATLAB Compiler

Troubleshooting Engine Applications

If you have multiple versions of MATLAB installed on your system, the version you use to build your engine applications must be the first listed in your system Path environment variable ... Otherwise, MATLAB displays Can't start MATLAB engine ... On Windows operating systems, you also need to register MATLAB as a COM server ... If you have multiple versions of MATLAB, the version you are using

Troubleshooting JDBC Driver Problems
You ran the clear all command in the MATLAB Command Window after you defined a JDBC data source

Troubleshooting and Debugging
See the section Setting the User in the MATLAB Distributed Computing Server System Administrator's Guide ... The MATLAB worker failed to start due to licensing errors, the executable is not on the default path on the worker machine, or is not installed in the location where the scheduler expected it to be ... MATLAB could not read/write the job input/output files in the scheduler's data

Video Preview Window Troubleshooting
Close MATLAB and run the application that came with your device

Troubleshooting Simulation Errors
Every numerical entry you make in a SimMechanics model must be a real numerical expression or MATLAB ® equivalent

MATLAB Builder NE Prerequisites
The table Application Deployment Roles, Goals, and Tasks describes some of the different roles, or jobs, that MATLAB Builder NE users typically perform and which tasks they would most likely perform when running the examples in this documentation ... See Magic Square Example: Creating a .NET Component From MATLAB Code ... To use the MATLAB Builder NE product, specific requirements exist

Troubleshooting I18n Messages and Settings
On some Linux systems, to properly display Asian characters in the MATLAB Desktop, you must configure the font with the Java Runtime Environment (JRE) ... If you previously configured fonts for your system, you must also make the configuration changes for the JRE distributed with MATLAB ... To configure, make a symbolic link between your font and the MATLAB font fallback directory

Common MATLAB Builder JA Error Messages
Install the MCR or add it to the MATLAB path ... Failed to find the library <library_name>, required by MATLAB Builder JA, on java.library.path ... See Directories Required for Development and Testing and Directories Required for Run-Time Deployment in the MATLAB Compiler User's Guide ... Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the library mclmcrrt712.dll

.NET Generic Classes in MATLAB
Since Item is a property that takes arguments, MATLAB maps it to a pair of methods to get and set the value ... The System.Collections.Generic.List class is in the mscorlib assembly, which MATLAB loads automatically ... Now you can use D in MATLAB functions ... If you want to execute the MATLAB commands shown in the following examples, build the DocGeneric assembly using the directions in

Troubleshooting Source Control Problems on Microsoft Windows
In some cases, MATLAB software recognizes your source control system but you cannot use source control features for MATLAB ... Specifically, when you select File > Preferences > General > Source Control, or run cmopts, MATLAB lists your source control system, but you cannot perform any source control actions ... Often, this error occurs because a registry key that MATLAB requires from the

Troubleshooting Issues with Variable-Size Data
If you assign an empty matrix [] to variable-size data, MATLAB might silently reshape the data in generated code to match a coder.varsize specification ... In this case, MATLAB reshapes the empty matrix Y = [] in generated code to Y = zeros(1,0) so it matches the coder.varsize specification ... During code generation, MATLAB does not check for upper bounds when it uses dynamic memory

Starting and Quitting the MATLAB Program
If you chose to have the installer create a shortcut, double-click the MATLAB shortcut on your Windows desktop ... For example, double-clicking a file with a .m extension in the starts MATLAB and opens the file in the MATLAB Editor ... For more information, see Associating Files with MATLAB on Windows Platforms ... After starting MATLAB, the desktop opens ... Opens Import Wizard to load the data

Troubleshooting Security Policy Settings From a Network Drive
If you run a .NET command on a MATLAB session started from a network drive, you could see a warning message ... To resolve this problem, run the enableNETfromNetworkDrive.m file, from the matlabroot\toolbox\matlab\winfun\NET folder ... This file adds the following entry to the security policy on your machine to trust the dotnetcli assembly, which is the MATLAB interface to .NET module:

Add-in and Macro Creation from MATLAB Functions
See the Troubleshooting appendix in this User's Guide for details on enabling macros ... This procedure plots a line from 1 through 4 in a MATLAB Figure window ... This graphic can be manipulated similarly to the way one would manipulate a figure in MATLAB ... MATLAB Programmer ... MATLAB programmer ... MATLAB expert ... Develops models; implements in MATLAB ... Adding a MATLAB Builder EX COM Function to

End-to-End Deployment of a MATLAB Function Using the Function Wizard
If you are still in the process of developing a MATLAB function that is not yet ready to be deployed, you may find this example to be an appropriate introduction to using MATLAB Builder EX ... The Function Wizard allows you to iteratively test, develop, and debug your MATLAB function ... It does this by invoking MATLAB from the Function Wizard Control Panel ... In MATLAB, locate mymagic.m

enableNETfromNetworkDrive - Enable access to .NET commands from network drive
enableNETfromNetworkDrive adds an entry for the MATLAB interface to .NET module to the security policy on your machine ... Troubleshooting Security Policy Settings From a Network Drive

To determine what products are installed on your system, enter ver in the MATLAB Command Window ... If you see such a message, or if the graphical icons do not appear on the blocks in this blockset, then enter gauges_register_ocx in the MATLAB Command Window ... Troubleshooting the Installation ... Troubleshooting the Installation

Contacting MathWorks and Using the imaqsupport Function
Your MATLAB path ... To have MATLAB generate this file for you, type ... Video Preview Window Troubleshooting

Overview of Debugging Resources
Using Plots for Troubleshooting ... Accessing Statistics from SimEvents Blocks and Sending Data to the MATLAB Workspace

Matrox Hardware
Note There is no difference between MIL and MIL-Lite software inside of MATLAB ... Troubleshooting Matrox Devices ... Troubleshooting Matrox Devices ... If you are having trouble using the Image Acquisition Toolbox software with a supported Matrox frame grabber, follow these troubleshooting steps:

Next Steps
MATLAB Central ... Try more examples using MATLAB Builder EX ... Learn how to write MATLAB code that is optimized for deployability ... MATLAB Code Deployment ... Troubleshooting

Performing Source Control Actions from the Editor, Simulink, or Stateflow File Menu on Microsoft Windows
For example, the Check out file(s) dialog box uses the MATLAB Editor icon instead of the MATLAB icon ... Instead, register a project using the Current Folder browser, as described in Register Source Control Project with MATLAB Software ... Troubleshooting Source Control Problems on Microsoft Windows

fprintf (serial) - Write text to device
Refer to Troubleshooting Common Errors for fprintf errors ... The MATLAB file callback function specified for the OutputEmptyFcn property is executed when the output buffer is empty ... For more information on synchronous and asynchronous write operations, see Controlling Access to the MATLAB Command Line ... Controlling Access to the MATLAB Command Line

Failure to Find a Required File
Make sure that matlabroot\runtime\architecture appears on your system path ahead of any other MATLAB installations ... (matlabroot is your root MATLAB folder.) ... Troubleshooting the Build Process

Getting Updated xPC Target Releases and Help
MATLAB Command Window Start >Simulink > xPC Target > Product Page (Web) ... In the MATLAB Command Window, type xpcexplr ... On 64-bit computers, use the MATLAB command-line interface ... This chapter contains general xPC Target troubleshooting tips ... MATLAB Central File Exchange for xPC Target Product ... General xPC Target Troubleshooting

Benchmarking Performance
Several MATLAB files are available to demonstrate HPC Challenge benchmark performance ... Troubleshooting and Debugging

Accessing the Preconfigured Blocks
Enter the gaugeslib command in the MATLAB Command Window ... If all the blocks say "ActiveX" and do not look like graphical displays, then follow the instructions in Troubleshooting the Installation

Using Vector CAN Drivers
When specifying the name for the Real-Time Windows Targets application, use the string MATLAB ... Troubleshooting

Software Reboot - Software Reboot
From the MATLAB Command Window, enter xpctest ... For more information, see Installation Troubleshooting

getxpcinfo - Retrieve diagnostic information to help troubleshoot configuration issues
getxpcinfo returns diagnostic information for troubleshooting xPC Target configuration issues ... MATLAB command line

Creating an Analog Input Object
Note You cannot use the legacy interface on 64–bit MATLAB ... If you do not see your adaptor in the list of available adaptors, refer to Troubleshooting Your Hardware ... The analog input object ai now exists in the MATLAB workspace ... Note If you cannot see your device in the list of available devices, refer to Troubleshooting Your Hardware

load - Load data from MAT-file into workspace
Function Syntax in the MATLAB Programming Fundamentals documentation ... If you do not specify filename, the load function searches for a file named matlab.mat ... The file can contain MATLAB comments (lines that begin with a percent sign, %) ... MATLAB returns the data as a single two-dimensional array of type double ... If you do not specify an output for the load function, MATLAB creates a

pmode Limitations and Unexpected Results
The labs that run the tasks of a parallel job are MATLAB sessions without displays ... Then use the graphical tool on the MATLAB client ... If you edit your model in the MATLAB client outside of pmode, you must save the model before accessing it in the labs via pmode; also, if the labs had accessed the model previously, they must close and open the model again to see the latest saved

About Memory Management and Cleanup
If memory constraints are still present on your system, try preallocating arrays in MATLAB ... It is safe to call mxDestroyArray when you no longer need a particular mxArray in your code, even when the input has been assigned to a persistent or global variable in MATLAB ... MATLAB uses reference counting to ensure that when mxDestroyArray is called, if another reference to the underlying

Mapping Time and Bond Cash Flows
Start Excel, Spreadsheet Link EX, and MATLAB sessions ... Press F2, then Enter to execute the Spreadsheet Link EX function that transfers the column vector Maturity to the MATLAB workspace ... Make A19 the active cell to transfer the column vector Coupon Rate to the MATLAB workspace ... Make A20 the active cell to transfer the settlement date to the MATLAB workspace ... Error Messages and

MATLAB Compiler software converts your MATLAB programs into self-contained applications and software components and enables you to share them with end users who do not have MATLAB installed ... MATLAB Compiler takes MATLAB applications (MATLAB files, MEX-files, and other MATLAB executable code) as input and generates redistributable standalone applications or shared libraries

Plot Functions
To view or modify a predefined plot function, open the function file in the MATLAB Editor ... You can use the PlotFcns option with the following MATLAB optimization functions: ... MATLAB returns the following: ... Troubleshooting and Tips.