What does /g/ think of MATLAB? Has anyone ever used it to program Arduino based systems? I'm using it in school for aerospace engineering and I want to use it for some personal projects with the Arduino plug in.
I had to learn it in uni. Horrible language, but it has huge number of modules/libraries. I have no experience in programming Arduinos but I would start with C or maybe C++. There is no reason to tie yourself to a fucking expensive language.
MATLAB is fine. I personally used it in school, but I wouldn't recommend using it for Arduino because you might as well use C. My guess is that it would be easier (after an initial learning curve), more efficient, and better documented than MATLAB's plug-in.
Don't waste your time on it... I haven't used matlab extensively but every moment I have used it I hated it. Using it for arduino is way overkill and probably way more complicated than just using C. Save yourself the trouble and just use C.
Horrible language, huge waste of money, designed for engineers who really can't be bothered to learn proper programming techniques.
You can do everything Matlab does faster in Python or R.
ITT: CS majors that are mad they got a D in MATLAB class and it doesn't work like Java.
EE here, Matlab is an indispensable tool for analysis and design
That being said programming in it is dumb
>You can do everything Matlab does faster in Python or R.
Bollocks. The only thing faster than MATLAB (on a single computer) is C/C++, but ain't nobody wasting time when you can get a comparable performance with just a fraction of the effort. Python and R are at least twice as slow and offer none of the benefits, except price, which hardly anyone who needs MATLAB cares about. The only other viable alternative is Julia, but it's still missing many feature and libraries.
Yes, both can (MATLAB does it by default) use the standard math libraries -- ATLAS, BLAS, etc. The thing is, MATLAB also has some of the best algorithms behind their implementations. Often literally the best discovered ones.
>Python and R are at least twice as slow and offer none of the benefits
Numpy/Scipy use many of the same numerical and scientific programming libraries found in C and Fortran (Lapack/blas for example).
The majority of things you do in MATLAB will not be slower in python.
The problem with Julia is less about missing features and more about backwards compatibility being broken with each update. Makes it too annoying to write any large projects in it right now. Missing libraries aren't really an issue because the FFI is surprisingly not shit.
Because it is everywhere, it can't hurt to have some skill. Also, some really useful python libs like matplotlib are heavily matlab-influenced. So go for it. Personally, I could never handle matlabs bullshit
>column and row vectors are completely different things and you'll always have the wrong one for everything you're trying to do herp di derp
They use the same libraries but in a much more inefficient way. I've done comparisons for projects before, you can do them yourself (both Python and MATLAB offer easy to use timing facilities).
Depends. Their optimisation library is really poor. Last I checked, no proper convex solver, everything is slow and formulation is just painful.
Nah just use C, but you could interface it to MATLAB with Serial.print
Take some analog data and print it over the UART, then read it in in MATLAB and filter it, fourier transform it or plot it.>>filterbuilder
>My colleagues had some data they were trying to process and plot with MATLAB it was too slow, they used open GL to get it to work in real time.
Sounds like the problem is in the plot part, not in the number crunching part.
OP just program your arduino in whatever you're comfterable with
Matlab is fine, it has a ton of well organized documentation and someone probably coded and published everything you need already so if you arent looking to become a matlab grandmaster you can save alot of time by reusing code
However if you're looking to pick up some programming skills figure out what language is relevant for aerospace engineering, Im guessing its going to be either python or lisp/scheme (if it isnt Matlab) so try either of those
>Language benchmarks, especially of vastly different languages are, and always will be, completely useless.
You must take benchmark with a grain of salt. But they stiil give you a ballpark figure.
I actually used it for a simple interface for a killswitch with some coworkers compiled (matlab) programs. I have the arduino board with relays on it to kill the power source so the cache/packets would refresh. So less drops happens and data can start back up and continue collecting if no1 is around to help it without the arduino connected.
I haven't used what?
I've used Matlab on a course I took to get ETCS credits and passed that with an A.
I've programmed an AVR recently in C, compiling with GCC and flashing with avrdude.
But yeah, I've never thought to use an expensive software with half-assed FORTRAN-inspired language designed for processing large data sets to program a fucking MCU.
Here's a taste:
>C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
>In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.
Bloated, expensive, piece of Java-based shit. It's mildly convenient for any application which is pretty much 100% linear algebra, but the price, hassle of getting it set up, and overall shittiness makes it not worth it.
>Enjoy paying 2K for the "privilege" to use a shitty language to do the same shit you can do faster and for free with python or R.
Octave is free. Besides, you don't know how the world works outside of your basement.
If you need something easy math scripting, R is better.
If you use the graphical toolboxes, matlab is pretty much the only option.
If you design a controller, or something like that it is very beneficial to just write the functions and draw the design. rather than write it as a function (unless you want to do that)
Find me something else that helps you design via root locus
>why buy something to do a job when you can waste time writing a theoretical piece of software for free
Tell me, do you know Laplace transforms? Feedback control?
Rings some bell. Everything's easy if you have some time, some books and can read.
Don't get so defensive. I'll rephrase:
Is it profitable to make matlab toolboxes for people, who for some reason (time constraints, knowledge, skills) can't create one?
What? Programming is the means and engineering is the end.
>Everything's easy if you have some time
you just answered your own question, welcome to industry
MATLAB is a fine choice for programming language for the sorts of projects an engineering undergrad would do, like interfacing some sensors and a step motor thru arduino with a PC or something, it is easy to learn and low-effort for the right tasks.
If you have some proficiency with C++ that's generally preferable, so if you have time to learn that first (you'll have to as an engineering student) it might still be your best option overall.