I see the message:
MuPADĀ® notebooks will be removed in a future release. Use MATLABĀ®
live scripts instead.
To convert a MuPAD notebook file to a MATLAB live script file, see
convertMuPADNotebook. MATLAB live scripts support most MuPAD
functionality, although there are some differences. For more
information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
I'm not interested in the notebook feature, but I do on occasion find some rather handy MuPAD functions, e.g. those in combinat - are these deprecated, or just the notebooks (neither of which am I very familiar with).
Related
There is a function in Matlab called copulafit. How can I see the code that underlies this function? Many numpy and scipy functions for Python are readily open source on Github, but I can't find Matlab functions on Github for some reason
If you have MATLAB installed you can either highlight the function name then secondary/right-click and select Open "copulafit" or alternatively type open copulafit in the command window. Yeah, I believe MATLAB isn't open source as of this posting time/date. Possibly why the reason for the lack of GitHub resources. Octave might be something that might be interesting to look into.
Somewhere between R2010b and R2018a, Matlab seems to have removed dos as a built-in function.
In R2010b:
>> which dos
built-in (C:\Program Files\MATLAB\R2010b\toolbox\matlab\general\dos)
In R2018a:
>> which dos
C:\Program Files\MATLAB\R2018a\toolbox\matlab\general\dos.m
Why, and when, was this change made?
If you open the file dos.m you can notice that is a wrapper to the built-in function
system so the answar might be that MathWorks has improved the system function to run correctly both Windows command and Unix command so a built-in function for a wrapper is useless due the definition of built-in function:
A built-in function is part of the MATLAB executable. MATLAB does not implement these functions in the MATLAB language. Although most built-in functions have a .m file associated with them, this file only supplies documentation for the function.
I wanted to ask if anyone have run some C code containing CUDA code on Matlab?
I have read the documentation on Mathworks website but I still cant quite wrap my head around it. I do understand that it is two main type of ways you could do this either executing a CUDA kernel by constructing a object with the function parallel.gpu.CUDAKernel or by constructing a mex file out of a .cu file. There are some things though I do not understand when using these two methods.
Using the mex approach should I use another IDE like Visual Studio to compile a .cu file first before compiling the mex file in Matlab? If so how can I compile the .cu file without a main() function in the .cu file, I always get errors when I try to compile it that way in VS, or is it okay to have a main function in the .cu file and pass the pointers to the GPU arrays to the main function?
For the CUDA kernel approach, should compile the kernel in VS, and in that case how?
Both things can work.
If you want to have flexibility, my suggestion is to write your .cu files with .c (or .cpp) files*. Once you have some basic thing working, you should be able to write a mex wrapper around it in order to grab MATLAB variables and convert them co C/C++ so you can pass them to and from CUDA. This requires you to have a compiler that is both compatible with your versions of MATLAB, CUDA and OS. An example is Visual Studio 2013 in widows and most versions of MATLAB and CUDA, but please check. Generally this is done by linking nvcc to the mex compiler after setup with some xml files (see example here from my toolbox). This approach gives you full flexibility, not only for working with CUDA, but also with working with the anything that you may want to use together with your kernels e.g. tensorflow, eigen, SQL, ... Its full flexibility.
If instead you just want a few operations accelerated with simple methods, use the Parallel computing toolbox with gpuarrays for standard MATLAB operations or with parallel.gpu.CUDAKernel for your own kernels. To use this second one you need to compile a ptx file, which seems pretty straightforward. A priori this gives you less flexibility, as it will run just a kernel, but often complex GPU programs may need several kernels and data handling techniques, as well as communication between kernels etc. However I have personally haven't tried it and perhaps you can achieve full flexibility. Let me know and I will edit the answer.
In short, you choice depends on your application/needs.
*You might not need .c or .cpp files with modern versions of MATLAB and mexcuda.
I am trying to read the following internal MATLAB function:
>>which visionInitializeAndExpandCheckerboard
built-in (C:\Program Files\MATLAB\R2015a\toolbox\vision\vision\visionInitializeAndExpandCheckerboard)
But it appears to be hidden away! And very well hidden.
None of the following methods to access it have worked:
Highlighting the name and pressing Ctrl+D.
Typing "edit visionInitializeAndExpandCheckerboard" in the command line.
Searching for the file in Matlab's own FindFiles.
Searching for the file on the disk.
Trying to Step Into the function in debug mode (I just get the output as if I had requested Step Out instead).
Btw, the reason I am looking into this is that the parent function detectCheckerboardPoints has seriously declined in performance from R2015a to R2016b and I am trying to figure out why.
The internal function is compiled native code, so you will not be able to see its source. If you see a performance degradation, you should call Mathworks tech support and complain. If it is something they can fix, they will send you a patch, and fix it in the next release.
I want to use Fuzzy Logic Toolbox in C#. To do this, I created a NET-library using deploytool, but it does not include the file fuzzy.m, which I need to work. And in the log mccExcludedFiles.log the following information:
This file contains the list of various toolbox functions that are not
included in the CTF file. An error will be thrown if any of these functions
are called at run-time. Some of these functions may be from toolboxes
that you are not using in your application. The reason for this is that
these toolboxes have overloaded some methods that are called by your code.
If you know which toolboxes are being used by your code, you can use the -p
flag with the -N flag to list these toolboxes explicitly. This will
cause MATLAB Compiler to only look for functions in the specified toolbox
directories in addition to the MATLAB directories. Refer to the MCC
documentation for more information on this.
C:\Program Files\MATLAB\R2010b\toolbox\fuzzy\fuzzy\fuzzy.m
called by D:\MyFolder\VNTU\bakal\matlabAndCs\ShowFuzzyDesigner.m
(because of toolbox compilability rules)
How do I include this excluded fuzzy.m file in the compilation?
The command fuzzy launches the Fuzzy Inference Systems editor, a GUI supplied with Fuzzy Logic Toolbox. Compilation of Toolbox GUIs with MATLAB Compiler is typically not supported, and as detailed in the documentation for MATLAB Compiler, this is true of the GUIs within Fuzzy Logic Toolbox.
I must say, I think the message you're getting in the mccExcludedFiles.log file is mostly misleading - all of those things could cause a file to have been excluded, but in this case the only relevant bit is at the end, "(because of toolbox compilability rules)".
You might want to look into how to build a fuzzy system using the line code functions supplied with the fuzzy toolbox, and not the GUI. This walkthrough gives you a pretty good handle on building a Mamdani inference system using the line code tools. I am not positive how these translate into C# code, but I think there should be equivalent libraries therein.
If you cannot find a natural way to implement the MATLAB routines in C#, then you could look at this discussion which links some free fuzzy libraries for C#. I think one of the links is broken, but the other three load just fine.