Author Topic: Matlab? Mathematica? Ma... what do I need!??  (Read 21006 times)

0 Members and 1 Guest are viewing this topic.

Offline ivan747Topic starter

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Matlab? Mathematica? Ma... what do I need!??
« on: February 10, 2015, 03:33:19 pm »
Why is this Matlab thing all the rage in the academic world? The circuits 1 teacher is suggesting Matlab for circuit simulation!

Now, I get that you can do lots of advanced maths processing, but, isn't it too much asking to use it as a substitute for a really basic circuit simulator? Besides, I haven't been taught how to use it. In fact, for most of my peers, this is the second time they touch a programming language. The first time was a 40 hour introductory programming course in C.  :palm:

Bear in mind that we have barely just learned how to do KCL, KVL and that sort of thing (well, they... I already learned it long ago).
« Last Edit: February 11, 2015, 02:14:27 am by ivan747 »
 

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 320
  • Country: dk
    • Google scholar profile
Re: Matlab?
« Reply #1 on: February 10, 2015, 03:43:00 pm »
It is used in academia because it is good. Probably your professor uses it for something else and he doesn't even bother to look at different software. You will probably use it later in the control class.

I love MATLAB but there are better circuit simulators. Spices for example: LTSpice (because it is free, fast and good) and Circuitlab (much nicer GUI + cloud stuff).
 

Offline ivan747Topic starter

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Re: Matlab?
« Reply #2 on: February 10, 2015, 03:51:27 pm »
yeah, I think it will be useful for something... Specially since I suck at doing symbolic math (I can mostly understand concepts and problems, but I suck at solving problems manually) so I work best with good tools.

And what about real world usage?
« Last Edit: February 10, 2015, 03:54:00 pm by ivan747 »
 

Offline rollatorwieltje

  • Supporter
  • ****
  • Posts: 571
  • Country: nl
  • I brick your boards.
Re: Matlab?
« Reply #3 on: February 10, 2015, 03:59:06 pm »
Similar strategy as Microsoft, Matlab is aggressively approaching universities to get students to use it. Then when students go work somewhere, employers have to buy Matlab for massive amounts of money because it's the only thing they are familiar with.

The Matlab infestation started in the company I work for as well, but we are actively trying to get rid of it. Python seems to be the preferred alternative now. At one point Matlab crap even ended up in production stuff (using the Matlab-to-C converter), that's where we realized this had to stop. Matlab also offers no license for continous integration / build servers...
 

Offline ivan747Topic starter

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Re: Matlab?
« Reply #4 on: February 10, 2015, 04:04:58 pm »


Why would you NOT use Matlab in a production environment? The same case as labview (unmaintainable code tied to proprietary technologies)? (I had the impression that matlab was less bloated than labview)
« Last Edit: February 10, 2015, 04:08:02 pm by ivan747 »
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Matlab?
« Reply #5 on: February 10, 2015, 04:31:38 pm »
Virtually everywhere I've worked in the automotive industry uses Matlab and LabView constantly.

If you're going to go into any field where there are gas/diesel engines or AC/DC motor control, you're going to see a lot of LabView and Matlab.  Industry standards, apparently.
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Matlab?
« Reply #6 on: February 10, 2015, 05:09:36 pm »
Matlab has been a standard tool for academia and industry going on a couple decades now.  Yes, it takes some time to learn the language, but if you know C, Matlab should be a breeze. 

Matlab is being suggested because so many of your circuit solutions will be done as matrices.  Matlab, as denoted by its name, has highly efficient algorithms for matrix computations. It can literally be 10X faster to solve matrices in Matlab than to try and compute solution element-wise (i,j).  The code that does the computation is also very compact once you understand how to convert the equation into Matlab matrix notation.

Using those algorithms with a streamlined language with built-in graphing libraries can yield quick results with not much coding.  It really is worth your time learning. 
 

Offline rollatorwieltje

  • Supporter
  • ****
  • Posts: 571
  • Country: nl
  • I brick your boards.
Re: Matlab?
« Reply #7 on: February 10, 2015, 08:21:33 pm »


Why would you NOT use Matlab in a production environment? The same case as labview (unmaintainable code tied to proprietary technologies)? (I had the impression that matlab was less bloated than labview)

Vendor lock-in. Also most features you want are in toolboxes. The price of those toolboxes is not listed for obvious reasons. Yes there is a trade-off between productivity and price, for some problems Matlab could be a good solution, but really for the stuff I see it being used for it's just a money sink. I would dare to say that if you have some experience in Python or whatever other language you could be just as productive.

Matlab also churns out new versions like crazy. People only seem to want to work with the latest and greatest version, so be prepared to spend even more money on the service contracts. Also then don't forget to update the Matlab runtimes on all machines that run those "Compiled Executables".

Those compiled executables are also interesting things, they actually aren't compiled at all. The exe is just some zip file containing the actual Matlab scripts and something that invokes the Matlab Runtime. The Runtime is basically Matlab without a GUI, so your nice Matlab application can't just run on any machine. Yep, you need another licence just to be able to use a GUI.

One of the arguments I hear often is that Matlab can be used by people who have no experience with programming... Matlab (well, the language) is just another programming language. It doesn't matter that it has some nice features, that's called syntactic sugar. The basic rules and quality standards of programming still apply. I can't really blame Matlab for this (although stuff like unit testing was only very recently introduced), but most Matlab scripts I've seen were "messy" at best.

What happens is that the research scientist builds something in Matlab, converts it to C using that C converter (he had to add 20 hacks as the converter for some reason can't convert everything), and then assumes the program works exactly the same on some embedded platform. Ironically the performance is often significantly better, but this is because there are literally no protections in the C code. Divide by 0? Not a problem. NaN? Infinity? Array sizes? Who cares. This analog sensor never returns 0, right?

/rant
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 5854
  • Country: dk
Re: Matlab?
« Reply #8 on: February 10, 2015, 11:04:48 pm »
snip
Those compiled executables are also interesting things, they actually aren't compiled at all. The exe is just some zip file containing the actual Matlab scripts and something that invokes the Matlab Runtime. The Runtime is basically Matlab without a GUI, so your nice Matlab application can't just run on any machine. Yep, you need another licence just to be able to use a GUI.
snip

The point of the compiled executables is that you can ship it with your product without having to buy a full blown matlab license for each of your costumers.
And lots of other programs and script languages rely on having the right runtime/dll etc.
 

Offline mswhin63

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: au
Re: Matlab?
« Reply #9 on: February 11, 2015, 01:27:32 am »
My 2 bobs worth, learn the hardest system and then should be able to apply yourself over many other more refreshing applications. That should make you more employable.

Personally I find Maple harder than MATLAB, but that is my feeling as MAPLE is much more mathematical, but it is an integral part of my Uni studies.

Learn other application of holiday break, use Uni discount offers where possible and so on.

Cheers

Bruce :)
.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Matlab?
« Reply #10 on: February 11, 2015, 01:36:17 am »
Quote
Why is this Matlab thing all the rage in the academic world?

Hardly all the rage. Widely used? yes, but only because many issues can be expressed in matrix and matlab is good at processing matrix.

Maple / Gauss are different in that they are processors of symbolic math, where Matlab are for numeric processing.
================================
https://dannyelectronics.wordpress.com/
 

Offline ivan747Topic starter

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Re: Matlab?
« Reply #11 on: February 11, 2015, 02:09:04 am »
use Uni discount offers where possible and so on.

The bastards never gave us student emails, so 95% of the time, I can't prove I am a student. In fact, the only place where I could register as a student without academic email was the IEEE.
« Last Edit: February 11, 2015, 02:15:23 am by ivan747 »
 

Offline ivan747Topic starter

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Re: Matlab?
« Reply #12 on: February 11, 2015, 02:10:54 am »
Quote
Why is this Matlab thing all the rage in the academic world?

Hardly all the rage. Widely used? yes, but only because many issues can be expressed in matrix and matlab is good at processing matrix.

Maple / Gauss are different in that they are processors of symbolic math, where Matlab are for numeric processing.

What about Mathematica? What's that all about? Technically, I have a copy of Mathematica installed on the Raspberry Pi. It comes bundled with the default OS. But it isn't convenient for day to day use.

I am looking for some sort of computer algebraic system that helps me with the darned symbolic math. You would have to be stupid crazy (and meticulous and smart) to solve any but the simplest differential equations by hand.

Perhaps one of these, instead?
http://www.amazon.com/Texas-Instruments-Nspire-Graphing-Calculator/dp/B00IQBSXN6/ref=sr_1_1?ie=UTF8&qid=1423620715&sr=8-1&keywords=cas+calculator
Because, when you come to think of it, these software packages cost even more than that calculator, and at least the calculator is giving me some very nice hardware I can carry around with me, perhaps even take to exams if the professor is easygoing. As a matter of fact, here's what they say about TI's N-spire PC software:
Quote
Successor to Derive. Based on Derive's engine used in TI-89/Voyage 200 and TI-Nspire handheld
Which means that calculator must be running some serious stuff in it.


oooor I could try going open source, if there's a open source package I can trust
Or there's this thing called Mathcad, that has a free version for unlimited time with limited features. I'll be definitely trying that.
« Last Edit: February 11, 2015, 02:46:42 am by ivan747 »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #13 on: February 11, 2015, 02:47:45 am »
mathmatica is the grand daddy of them all (symbolic processing). last time I used it must be in the 1980s or something like that.

Maple is all the rage, in that niche.
================================
https://dannyelectronics.wordpress.com/
 

Offline ivan747Topic starter

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #14 on: February 11, 2015, 03:19:17 am »
I'm probably going to be alright (for personal use) with Mathcad an a TI nspire. But the class requires Matlab. Do they expect us to pirate it? Pay full price? Well I don't wanna do either, I want my .edu email  :rant: Sorry about the rant.
 

Offline f5r5e5d

  • Frequent Contributor
  • **
  • Posts: 349
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #15 on: February 11, 2015, 03:36:17 am »
actually Mathematica is a relative newcomer - Maxsyma/Maxima dates from the 70's

the DOE Maxima version is open source distributed as wxMaxima and in Sage Math - which wraps every free math package under the sun in Python



Matlab is primarily for numeric matrix math - symbolic math with matrixes quickly becomes unwieldy although Matlab does bundle the MuPad symbolic math in a tool box


matrix formulations of circuit theory are not much used by practicing EE outside of RF where "circuit theory" approximations no longer apply - Spice circuit simulation is much more often used, helpful


control theory however is often done in State Space formulation with heavy reliance on matrix algebra


Matlab has well developed State Space control theory toolboxes - but largely numeric


Octave is the open source workalike for Matlab, free Scilab is less compatible but has more of a GUI and the Xcos dynamic simulation add on
« Last Edit: February 11, 2015, 04:08:36 am by f5r5e5d »
 

Offline rollatorwieltje

  • Supporter
  • ****
  • Posts: 571
  • Country: nl
  • I brick your boards.
Re: Matlab?
« Reply #16 on: February 11, 2015, 08:27:48 am »
snip
Those compiled executables are also interesting things, they actually aren't compiled at all. The exe is just some zip file containing the actual Matlab scripts and something that invokes the Matlab Runtime. The Runtime is basically Matlab without a GUI, so your nice Matlab application can't just run on any machine. Yep, you need another licence just to be able to use a GUI.
snip

The point of the compiled executables is that you can ship it with your product without having to buy a full blown matlab license for each of your costumers.
And lots of other programs and script languages rely on having the right runtime/dll etc.

Yes, whay I was trying to say is that it only works under certain conditions. Everything that requires a GUI (one of the strong points of Matlab, it's easy to visualize everything) can't run using that Runtime.
 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1707
  • Country: gb
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #17 on: February 11, 2015, 08:54:56 am »
Compiled Matlab programs most certainly can run with a GUI - what they can't include is the Matlab IDE

(20+ year Matlab user)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5528
  • Country: gb
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #18 on: February 11, 2015, 09:01:39 am »
If you can avoid the Matlab specific toolboxes, Octave is a reasonable replacement for Matlab.

As a one-man band, I simply cannot justify the cost of Matlab. My recurring software spend is already around $5,000pa as it is. I only use Octave with any gusto three or four times a year for a couple of hours or so each time. Octave/Matlab is very useful for numerical analysis, as Excel can be ;-) but for engineering number crunching Octave/Matlab can often be better than Excel due to the sheer volume of data.

I do miss Matlab's FDATool though, but you can design filters without it.

As others have said, relying on any machine-generated C code is often a disaster for ongoing maintenance. Sure, take the coefficients you generated from Matlab, but resist being lazy and taking the spoon fed code it generates: you, or someone else, will surely be cursing sometime in the future as a result.
 

Offline mswhin63

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: au
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #19 on: February 11, 2015, 12:02:00 pm »
I'm probably going to be alright (for personal use) with Mathcad an a TI nspire. But the class requires Matlab. Do they expect us to pirate it? Pay full price? Well I don't wanna do either, I want my .edu email  :rant: Sorry about the rant.

If you have a student ID, that can be used as well. Different process in identification though and take a bit longer, usually during the trial period.
.
 

Offline rr100

  • Frequent Contributor
  • **
  • Posts: 339
Re: Matlab?
« Reply #20 on: February 11, 2015, 12:40:53 pm »
I am looking for some sort of computer algebraic system that helps me with the darned symbolic math. You would have to be stupid crazy (and meticulous and smart) to solve any but the simplest differential equations by hand.

Maple user here since 90's. I tried many things and if you aren't stuck because of profession, course, whatever with some particular software I strongly recommend something free and open.

http://en.wikipedia.org/wiki/Sage_%28mathematics_software%29 is fairly complete and the only problem is that it's web based and doesn't run natively on Windows (and by web based I mean you can run it yourself, there's no need to use somebody else's server unless you want to).

And you can run it online on their servers (think google docs but for math programs).
 

Offline Sigmoid

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: us
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #21 on: February 11, 2015, 06:48:50 pm »
If you can avoid the Matlab specific toolboxes, Octave is a reasonable replacement for Matlab.

Yea, there's Octave and one other free software alternative that I can't recall off the top of my head.

MATLAB is really good, but as said above it is expensive, and that doesn't seem to be a thing if you are at a university. ;) Some of it isn't even legal. I've seen pirate copies of MATLAB handed out on DVDs by professors, to be used as a prerequisite of getting a grade.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #22 on: February 11, 2015, 07:01:20 pm »
If you can avoid the Matlab specific toolboxes, Octave is a reasonable replacement for Matlab.

Yea, there's Octave and one other free software alternative that I can't recall off the top of my head.

MATLAB is really good, but as said above it is expensive, and that doesn't seem to be a thing if you are at a university. ;) Some of it isn't even legal. I've seen pirate copies of MATLAB handed out on DVDs by professors, to be used as a prerequisite of getting a grade.
Are you thinking of scilab? Its isn't a direct alternative, but its in the same ballpark.
 

Offline djacobow

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: us
  • takin' it apart since the 70's
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #23 on: February 11, 2015, 07:23:29 pm »
In addition to Octave, if which is supposed to be close to a "drop in" replacement, you have excellent matrix abilities in Python+NumPy or Perl+PDL. The advantage of both of those is that they are embedding top-notch numerical capabilities in real, solid programming languages with large libraries of other useful stuff. I'm partial to PDL, but nobody seems to be learning Perl anymore, it's dead for the most part.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Matlab? Mathematica? Ma... what do I need!??
« Reply #24 on: February 11, 2015, 08:02:25 pm »
MATLAB is really good, but as said above it is expensive, and that doesn't seem to be a thing if you are at a university. ;) Some of it isn't even legal. I've seen pirate copies of MATLAB handed out on DVDs by professors, to be used as a prerequisite of getting a grade.

The origin of the program bits doesn't solely determine if you're using pirated software or not.  If I'm licensed for MATLAB, I can download a pirated version and patch the binary so that no license server is required (for example) and still be covered by the license I purchased.

I'm not saying that your anecdote is false, just saying that things like site licenses can be granted to organizations who then tell you to "obtain the software yourself."
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->