Matlab supportpackageinstaller not presemt - matlab

I have just installed a fresh copy of elementary OS freya in my lappy and after that did an installation of matlab R2012b. First I tried using the image acquisition commands but they didn't work as the library was not there. To install I typed
supportpackageinstaller
but it gave an error
Undefined function or variable 'supportPackageInstaller'.
This is the first time I am installing matlab on linux so I don't know how to solve the problem.

copied from: http://www.mathworks.com/matlabcentral/answers/88896-how-to-install-add-on
the supportPackageInstaller is a new feature in R2013b and doesn't exist in older releases than R2013b. Which version are you using? If its not 13b you need to look up the support package on the File Exchange. Only for example Simulink Support Package for Arduino Mega 2560 Hardware (R2012a)
refer to another:
http://148.204.81.206/simulink/ug/start-support-package-installer.html#
Start Support Package Installer
You can use Support Package Installer to install support for specific third-party hardware and software products.
Support Package Installer guides you through the process of downloading and installing a support package.
To start Support Package Installer, use one of the following methods:
In a MATLABĀ® Command Window, enter targetinstaller.
In a model, select Tools > Run on Target Hardware > Install/Update Support Package.
Double-click a *.mlpkginstall file.
On the MATLAB tool strip, click Add-Ons and select Get Hardware Support Packages.

Related

Creating an X11 frame in mit-scheme + scmutils

I am working through the book Structure and Interpretation of Classical Mechanics, which requires writing scheme code in mit-scheme for its exercises. I've installed scmutils, the scheme library provided with the book, and when I launch mit-scheme, the following items are listed:
Release 10.1.10
Microcode 15.3
Runtime 15.7
SF 4.41
LIAR/x86-64 4.118
SOS 1.8
XML 1.0
Edwin 3.117
X11 1.3
X11-Screen 1.0
ScmUtils Mechanics.Summer 2019
This seems to suggest that X11 support is enabled. However when I use the frame command to try and create a window for a plot,
(frame 0 :pi/2 0 5)
I get the error:
;Could not find plugin: "x11"
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1
This is on Linux with X11, with mit-scheme installed through the package manager (pacman) and scmutils downloaded from the book/course website.
Moreover, some other commands from scmutils that involve invoking X-windows, like show-expression (that generates DVI output from an input math expression and launches XDVI) work fine.
The install guide for mit-scheme says I need libx11-dev (or equivalent) installed if I want support for X11 graphics, but I downloaded the binary package from the repositories and I can't tell if it comes with X11 support.
Figured it out. The version of mit-scheme available in the Arch Linux repositories does not come bundled with the plugin x11 for X11 support, and it wasn't straightforward to add it manually.
Instead I downloaded the source from gnu.org and compiled it manually, then reinstalled scmutils on top for the SICM-specific features.

why does the error regarding gcc is occuring in matlab?

I have download that code from github.
Whenever that code tries to check mexopencv (a file inside lib folder). It shows an error on Matlab 2017a that is:
[error 3] please make sure gcc >= 4.4 g++ >= 4.4 is installed ...
I am having a gcc version of 8.8.0
Following is the description of system
Window 10
Visual Studio 2012
Matlab 2017a
opencv 2.4.10
mexopencv (install from your folder LIB)
You might lack of standard libraries (.dll in Windows but .lib in Linux). The code was developed under Linux (help is also only provided for Linux systems) and once tested under Windows 7.
The method was tested under OS linux lubuntu 14.04, CPU intel i5 and
16GB of RAM. This guide was written under a linux-based distribution
scope, more precisely debian. Unfortunately we lack experience to
address bugs or any problem that could emerge in non-linux OS, we will
provide only linux OS help regarding execution problems, we apologise.
we tested this code on Windows7. We successfully installed opencv
2.4.10 following this tutorial: [http://www.learnopencv.com/install-opencv3-on-windows/]
This suggests that the mex-function is also linux-based. The error should vanish if you compile the source code yourself on your system, e.g. with MinGW (also GCC), see here.
EDITED:
the README.markdown file (under LIB/mexopencv-master.zip) provides a little guide through the installation process of both, openCV and the mexopencv function for unix (including ubuntu 14.04) and Windows systems. The latter states:
Browse to mexopencv root folder, and type the following in the MATLAB
command window:
>> mexopencv.make
By default, mexopencv assumes the OpenCV library is installed in
C:\opencv. If this is not the case, specify the path as an argument:
>> mexopencv.make('opencv_path', 'c:\your\path\to\opencv')
Note that if you build OpenCV from source, this path specification
might not work out of the box. You need to replace dll files in the
OpenCV package with newly built binaries. Or, you need to modify
+mexopencv/make.m to correctly link your MEX-files with the library.
To remove existing mexopencv binaries, use the following command.
>> mexopencv.make('clean', true)
It requires a standard C++ compiler supported by Matlab (see here), any Visual Studio installation should be OK, as an open-source option MinGW is recommended. Just remember to pick the right system (usually 64-bit).

LNK1104 when using MASM 64bit

I'm currently trying to learn Assembly for x64 Windows. I tried the example code from this Intel website,
but whenever I try to compile it with the command given in the document:
ml64 hello.asm /link /subsystem:windows /defaultlib:kernel32.lib /defaultlib:user32.lib /entry:Start
I always get an
LNK1104 error
I know that it means the compiler can't find the library file, I googled the problem and quickly found that I need Visual Studio with Windows SDK, which I downloaded and installed. But still can't find a kernel32.lib or user32.lib in any files other than the Windows system files.
I tried everything and I simply can't fix it. I hope someone could help figure this out.
There is a well-known MASM32 SDK available created by hutch--. This package contains the requested libraries in a (legacy) 32-bit version.
But there is also a 64-bit update of that famous package by hutch--:
Current build of the 64 bit MASM SDK.
It should contain the .inc and .lib files you need and more...
This is the current build of the 64 bit MASM SDK. This one is a lot closer to complete and with the correct Microsoft binaries added to it, it is capable of building a wide array of application types. It can be use in 2 different ways, it should be unzipped from the root directory of the partition that it is being installed on. You can either manually add it to an installation of the MASM32 SDK OR you can install it on a partition that does not have MASM32 on it and simply rename the buildx64 directory to MASM32. Installing it on another partition is the preferred technique as QE has its menus and accessories set up for building 64 bit code.
You still need to add the Microsoft binaries which would typically be from an installation of vs2017 or from an earlier version for Win7 64. In the bin64 directory there is a file called "Microsoft_File_List.txt" which shows the files you need. The list is from the current version of Visual Studio 2017 version and if this is the version you have, use the ML64 from the "x86_amd64" directory that is 402,584 bytes in size.
In the "buildx64" directory is a batch file called "makeall.bat". This must be run to build all of the libraries and include files.
They are the gold standard of Windows assembly developing.

How to install MinGW-w64 C/C++ compiler for use in MATLAB 2016b?

I am installing the MinGW-w64 C/C++ compiler for use in MATLAB 20176b but there is several errors for that. How can install this compiler with all the necessary adjustments to use in Matlab 2016b?
As the first way directly from Matlab:
Downloaded the MinGW-w64 C/C++ compiler for Windows from here:
https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c++-compiler
After running true Matlab and approval for installation and installing the packages, it gives an error as:
There was a problem installing the third-party software. To resolve
this issue, contact Technical Support
The second approach is to install the MinGW-w64 C/C++ compiler separately and then adjust to use in Matlab. But After installation Matlab doesn't recognize it.
The details provided on Matlab not recognizing the MinGW installation are a bit vague, but I'll take a shot at it.
When installing MinGW, the default installation directory is one with spaces in the path (Program Files). For some reason, this is not supported by Matlab (https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html):
Do not install MinGW in a location with spaces in the path name. For example, do not use: C:\Program Files\TDM-GCC-64
In my situation, I installed MinGW directly on the C drive. As such, my installation directory has the following layout:
C:\mingw64
C:\mingw64\bin
C:\mingw64\etc
C:\mingw64\*...
Once that is installed, all you need to do is point Matlab to the installation directory, in my case, I need to run the following command:
setenv('MW_MINGW64_LOC','C:\mingw64')
After that, you should be squared away to run the mex compilation command.

Packages missing from new install of Canopy Express

I just installed Canopy Express 1.4.1 (32-bit) for Windows. Among the packages that are supposed to be there (see https://www.enthought.com/products/canopy/package-index/ ) are pandas and statsmodels. But after installing, neither is listed in Package Manager, either as being installed or available.
The lack of pandas is not a problem, as pip easily installs it. (Enthought notes that packages installed that way will not be listed in Package Manager, but are fully available in the Canopy User Environment. Indeed, it imports.
statsmodels is not so easy. pip only gets source, and there is no Windows installer provided by the statsmodels folks. There is a nightly Windows binary, but not (if I'm reading correctly) for the stable build. The suggested solution by statsmodels is to compile it, using MinGW, which I do not currently have installed.
With enough trouble, I imagine I could compile and install, but is there a way to save all that trouble and get the packages within Canopy, as Enthought says it should be?
Seems like your Package Manager is misbehaving or you are looking in the wrong place (look in Free Packages not Community Packages).
Pandas is indeed in the Express installer, so always installed. At Canopy's python prompt, type:
import pandas
Though sounds like you've already overwritten it with pip, not really a problem but not the cleanest path (mixing 2 different installation methods for the same package).
Statsmodels is listed in package manager (Free package). It is available to free users but is not yet in the Express installer.
If you still don't see these in the pkg mgr, please quit Canopy, ensure that all Canopy processes have terminated (easiest way... log out of Windows, then back in), and restart Canopy.