Matlab Vs. Maple for curve fitting to data, finding eq'n of curve then integrating through code - matlab

Im sure there are a thousand different posts on Maple vs Matlab, but i have a bit of a unique set of requirements and before i go off to learn one of the two i would like to know which one will do it best.
I have a set of data from an accelerometer recording an impact. I need to do the following:
fit a curve to the data
Find the equation for that curve
solve the equation listed at the link
http://upload.wikimedia.org/wikipedia/en/math/2/d/3/2d39556df1dbbd467dc914253e93cdb0.png
which solves for a family of curves,i.e the MAX under the interval.
I would like to do this as seamlessly with visual studio as possible. The GUI and all the other elements of the app are built in VB and I would like to keep it there. I know maple has a code generating part to it that will convert to VB, would it be able to handle something like this? Does Matlab integrate with Visual Studio well? I would be thrilled if there was an object i could place on the VB form which would facilitate the communication to and from the matlab or maple framework. Currently i have it working with R, however to do so i need to write the data to a file, launch the R script, wait for it to finish, return control to my VB app and take it from there. This process takes too long and since i do not have experience with multi threaded programming the GUI freezes up when control is passed to the script.
Any help or suggestions would be very much appreciated!

In your case I would choose neither of the two. You may have a look at Python Tools for Visual Studio. The blog post mentions support for NumPy & SciPy for .Net which gives you all the math power you need at hand well integrated in the .Net world.
EDIT:
By looking at matplotlib's gallery I'm tempted to say that matplotlib is on par with MATLAB.

MATLAB doesn't auto-generate VB code, but it can easily be called from a VB application without the indirection of writing a file. It has COM interface that can be called directly from within VB code. See this example from the MATLAB documentation to find out more.
To carry out the technical analysis you've mentioned, you would probably save time by using Curve Fitting Toolbox in addition to base MATLAB.
Note that the above method of connecting to MATLAB via its COM interface relies on there being a live copy of MATLAB present when the VB application is executed. If you need to share your application with people who don't have a copy of MATLAB, you can also create standalone COM components and .NET assemblies from MATLAB code that can be called in the same way by your VB code, but can be deployed freely to people without a MATLAB license - however, this requires an extra product, MATLAB Builder for .NET.

Related

Is it possible to run the Omnet++ with a command in Matlab?

Hello I am new to the Omnet++. I was trying to run the Omnet from the Matlab. Is it possible to run the particular project and generate results in Omnet++ using the Matlab or any command and without actually going on the graphical interface for pressing run button in Omnet++?
From what I have read in the official documentation site (https://omnetpp.org/), it is a library for discrete event simulation. The library is writeen in C++.
It is possible to compile and use C++ code and results using the Matlab MEX-API. (http://es.mathworks.com/help/matlab/call-mex-files-1.html). This API provides a fairly easy bidirectional connection interface between Matlab and C++. It enables matlab to create data to be further processed in C++ and the show the results on matlab later.
Hope it is useful for you!

How to implement fixed point operations without Fixed Point Designer Library in Matlab?

I am supposed to work with an existing code in my work and at some places the previous programmer has extensively used Fimath function. Unfortunately, I am not having the license for the Fixed Point Designer toolbox and was looking for some alternatives.
I tried getting the fimath.m file from another source but it is referencing to some embedded libraries in the toolbox.
Is there some other way in which I can bypass this problem?
Thank You

Integrating Matlab with C++

I need to localize facial landmarks as a part of my research project and planning to use Supervised Descent Method (SDM) for that. Both the C++ and Matlab versions are available at the following site and when I contacted them they said C++ version is not going to be available until they secure it. So, I had no other option and had to opt for Matlab version.
http://www.humansensing.cs.cmu.edu/intraface/download_functions_matlab.html
The problem is that My project is in C++ and OpenCV. I wonder whether there is a way to access Matlab version of SDM in Visual C++ . I mean, is there an integration mechanism available for that ?
And, the next issue is when executing the "Facial Feature Detection" code available at the above site I get the following error.
I executed it as given below.
[detected_points] = xx_track_detect(Model,[],image,[],options);
and, it says "undefined function or variable named 'model' "
anyone have a solution to this ?
It seems like you need to use Matlab engine to be able to execute Matlab commands from C++. The engine interface allows you to do just so.
Regarding the model variable - it is probably a representation of the learned model for facial landmarks, it should be supplied with the packge or you need to tune it by yourself. Without additional information I suggest you contact the publishers of the package for more information.

Graphical output in Perl

A very simple question but just not some thing I have done before and that I have been playing with on and off for a while now.
The basic outline is that I have been playing with different ways of generating procedural based star scapes with the idea that it can generate displays that contain “constellations” that orbit with in a much large field.
The eventual idea is to hook up a laser projector (or two), but you run these using DACs and Galvos. in the mean time I want to simple output to a standard monitor and while I can do this with C# and Visual Basic .NET, graphical output from Perl is not something I have ever done.
Can any one point me in the right direction of what I should be looking at? I just want to create an X by Y window that I can map the starscape array to.
You can use Gtk, Qt or other toolkit to create GUI for Perl applications. I tried Gtk. The installation was not so smooth on Windows, but when I got it running, it was pretty much easy to use. The Gtk bindings for Perl can be installed from CPAN.

free MATLAB environment

I'm learning the MATLAB language and would like to have some kind of free environment to experiment with. The MATLAB environment provided by MathWorks is commercial. There appears to be a trial available, but I can't figure out how to get the trial license.
For the moment, all I need is a command-line and the "standard libraries".
Octave is mostly compatible with matlab: http://www.gnu.org/software/octave/
If you are just starting with MATLAB I would strongly suggest to go the Python path instead (unless there is some very specific reason why you must use MATLAB). The basics (like array / matrix operations) are very similar to MATLAB.
In my current area of work (neuroscience) there is a strong migration from MATLAB to Python. Many groups are making the switch because Python is free and generally more powerful.
The basic packages you will probably need to get started would be numpy (basic array numerics), scipy (more algorithms) and matplotlib (plotting). Since you want to work on the command line I suggest IPython as well.
As already mentioned in another answer there are also some Python distributions which include many packages, like PythonXY, the Enthought Python Distribution, or Anaconda.
There are many tutorials available on the web, search a little and pick one you like.
Look into these:
Scilab
Octave
Sage
Read this blog entry from Ryan Morlok for more info on open source Matlab alternatives.
I'm a big fan of R, but it's not a substitute for Matlab... it's an alternative. There's a big difference!
I was recently enamoured of Python XY. It's not exactly like Matlab but it has many of the same functions and copies the look and feel. I would personally use it if I didn't want to buy a Matlab license though - not if I wanted to practice with a Matlab stand-in.
www.pythonxy.com
Other users have given you the examples that I would have suggested - Octave and Scilab. Of the two, I would say that Scilab is more powerful BUT Octave tries really hard to be source compatible with standard MATLAB and Scilab does not.
So, if your aim is to experiment with a MATLAB like language and learn skills that you will eventually be able to transfer over to MATLAB then I suggest that you stick with Octave.
If you're interested in trying things out in MATLAB directly, there was a recent blog entry on The MathWorks website regarding free trial downloads of MATLAB and its various toolboxes. If you haven't tried contacting them already, the blog links to this page where you can request product trials or, if you already have a licensed product, you can sign in and downloads trials of toolboxes.