Tthe locations would depend (as Dmitry has suggested) on how you installed the packages. Usually, installation from source would dump the binaries and related files in /usr/local. For details on where standard distributions (like Debian and others put files), consult the Filesystem Hierarchy Standard.
where matlab -e will output a lot of information to run MATLAB. So we need to pipe them to sed -n 's/MATLAB=//p' to only select the MATLAB root. I use this in my Makefile document to find the path to mex compiler without start MATLAB. It is very quick command. Here is what I used in my Makefile document just for convenience:
According to the official answer of MathWorks (See Where is MATLAB installed on my machine?) it is located in - \usr\local\MATLAB\Rxxxxx where xxxxx stands for the version. For instance R2019a for the version released in March 2019.
Matlab is a programming language and optional GUI environment for numerical linear algebra. Its computations are normally done in IEEE 754 64-bit arithmetic (Fortran's DOUBLE PRECISION and C/C++/Java's double data types).
Its development started about 1980 at the University of New Mexico in Albuquerque, NM, as an offshoot of the famous EISPACK and LINPACK software library projects. In 1984, Matlab's author (a former Utahn) co-founded a separate commercial company known as The Mathworks, Inc.
The University of Utah has subscribed to a Matlab site license (but only for Unix systems) since about 1990, and consequently, Matlab is widely available on campus, and used in many courses in several different departments.
Octave is a reimplementation of part of Matlab developed by Professor John Eaton at the University of Texas, Austin, and later at the University of Wisconsin, Madison. It is freely distributed under the GNU General Public License and has its own Web site at There are pointers there to several topics, including About Octave and a FAQ, plus a discussion of its compatibility with Matlab.
Octave includes a large part of the numerical parts of Matlab, but does not provide a fancy GUI, or support for Matlab toolboxes. Since professional versions of Matlab are quite expensive, some users may find that Octave is an acceptable replacement. Octave provides some limited graphics output with the gnuplot utility.
Octave is a large and complex system, with more than 192,000 lines of C++ and C code, and more than 100,000 lines of Fortran code. We attempt to install each new release of Octave, and most of our systems have it installed, although not always at the latest version. No version has yet successfully built on our GNU/Linux MIPS, PowerPC, and SPARC, OSF/1 Alpha, OpenBSD IA-32, and Apple Mac OS X PowerPC systems.
About 450 of them: see the extensive matlab bibliography. Matlab has extremely wide applications in academia and industry, so be careful to look for the books with titles in your specific area of interest.
In addition to those PDF files, the other online documentation is the help system inside Matlab. In a Matlab session, type the command help followed by a function name or topic, or use the Help button in the GUI version:
On systems where the Symbolic Math Toolbox is available and licensed for use, Matlab can communicate with Maple to perform high-precision computations, at the expense of wrapping expressions inside character strings in function calls. Here is the above example, but now in 50-decimal-digit precision:
The gnuplot plot data is stored in a temporary file with a random name, such as /tmp/oct-naSEgw. The temporary file is deleted when octave exits, but before then, with care, you can rescue it by copying into another file, and then use gnuplot directly to produce improved views with better fonts and thicker lines.
The File -> Save As menu path lets you save the plot in more than a dozen formats, including PNG color bitmaps and PDF, suitable for typesetting with pdflatex and pdftex, and Encapsulated PostScript, suitable for typesetting with latex and tex.
However, to capture both the plot and the menus, here we made a screen dump by running the X Window Dump command in a separate terminal window, piping its output into the ImageMagick format-conversion tool:
The PBM/PGM/PNM tools from the PBMPlus package are found in the directory /usr/local/pbmplus which is currently in our default search path. The bug is fixed in the newer NetPBM tools, found in /usr/local/netpbm/bin. This alternative pipeline produces correct output:
Notice that Matlab did not preserve the gray background that was present in the window snapshots when it saved the PNG file. Whether this is a bug or a feature depends on your subsequent use of the plot.
The same Matlab plotting commands in Octave result in invocation of the external gnuplot program. The plot takes tens of minutes to complete, and even after reducing the grid step size from 1/32 to 1/8, still takes several minutes. The plot is of very poor quality, and looks like this:
gnuplot provides no facilities for interacting with the plot, so the one view that you see is all that you get. The plot data is stored in a temporary file with a random name, such as /tmp/oct-TgPTTq. With care, before octave exits, you can rescue the data by copying that file into another file, and then use gnuplot directly to produce alternate views.
The GUI version of Matlab allows you to store a plot in a special binary file called a Matlab FIG file, and that is the default format when you save a plot in the GUI (but not in the text-based version). The FIG format has the advantage that the Matlab GUI's File -> Save as menu path can subsequently be used to save the file in more than a dozen different formats, including the widely-used Encapsulated PostScript (EPS) and Portable Network Graphics (PNG) formats.
However, the disadvantage is that the FIG format is known only to Matlab. You cannot edit a FIG file, and you may have to discard it, if it ever becomes corrupted. We have seen cases where such files produced on one Matlab version could not be successfully read on another version that differed only in the minor version number. You should therefore not expect to be able to distribute your FIG files to others. Instead, choose one of the more portable formats that can be handled by a broad range of applications.
A problem with most software for producing PostScript illustrations is that line widths are too thin, and text too small, when reduced in size for publication in a typical two-column scientific journal, or as a figure in a book. Lloyd Trefethen recommends in his book Spectral Methods in MATLAB (ISBN 0-89871-465-6, p. xvi) that four Matlab graphics parameters be adjusted. Since these settings are likely to be needed in more than Matlab session, put them in a file in your home directory like this:
In a Matlab session in an working directory, all that you need to do is issue the command startup to get that file read from your home directory. You can later find the value of one of those parameters like this:
The Matlab vendor supports only a few of the architectures that we have: Apple Mac OS X on PowerPC, GNU/Linux on AMD64 and IA-32, Microsoft Windows IA-32, OSF/1 Alpha, SGI IRIX MIPS, and Sun Solaris SPARC. The latest version is not available on all of those platforms.
There is a standard command called bench in Matlab that runs several different computations and shows how the current system performs compared to others for which the vendor has provided measurements. The work it performs changes from release to release, so you cannot use it reliably for comparing different versions of Matlab.
On many modern processors, for energy conservation, the CPU clock speed is lowered when the machine is idle (because energy consumption rises roughly as the cube of the clock rate), so you first need to make it busy. This is most easily done by giving the command a numeric argument: bench(10) runs the test ten times, and shows graphically, and in a numerical table, how this machine performs compared to others.
Replacing the last argument with other values known to Matlab produces other graphics file formats, but most are frozen-and-low-resolution bitmap formats that are unsuitable for publication, and introduce unwanted artifacts in the plot if they involve lossy compression, as the JPEG format normally does.
You should check if your C# program is configured in x86 or x64 configuration. In VisualStudio 2010, when you start programming, the default mode is x86 configuration, even though your windows OS is 64 bit. After changing the configuration to x64 in VS2010, the exception should disappear now.
There is nothing special to tackle the System.TypeInitializationException exception in Matlab 2010a and 2009 a/b in x64 setting.The same solution applies. If you encounter weird problems, I suppose that it is most likely related to your OS problems. Try to get it done on a clean OS or virtual OS (e.g. Virtual Box or VMWare), and see if the same problems pop up.
Please if you work for Mathworks release a version of MWArray which Target .NET framework 4.0. There should be a version for all .NET framework. Without this it is not posisble to run .NET 4.0 client calling into matlab generated asembly on Windows 7 64 bit simply because .NET framework 2.0 is not supported. When I target 4.0 inside matlab I expect ALL dependencies to be .NET Framework 4.0 !!!
Hi I find how to fix in other way my problem add this configuration to the app.config file. this should figure out the problem. I think that it is related to the version of the dll that was created with matlab
But the same code fails when running in a worker role through an Azure Cloud Service project. The application just crashes out silently and stops debugging at the line that initializes the class in the dll. There is this message in the Debug Output window:
It fails both running in the Azure Emulator on my dev machine, and when deployed to an Azure worker role on a Cloud Service. Yet when I execute a console app that calls the same dll via Process.Start it calls the MATLAB/MCR/.Net dll successfully. (I have a startup task that silently installs the MATLAB MCR)
b1e95dc632