Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 112
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
RateReducer (35)


Next birthdays
11/02 Download (31)
11/02 ScottH (37)
11/03 Electroguy (94)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

Python instead of Matlab

Move Thread LAN_403
nrhoades
Tue Nov 20 2007, 02:44PM Print
nrhoades Registered Member #610 Joined: Wed Mar 28 2007, 09:44PM
Location: Middletown, RI
Posts: 110
For those who use MatLab:

I'm sure many are aware of the Python programming language, but for those who aren't I just wanted to put a plug in for it. Python is a very robust very high level scripting language with support on most platforms. Everything is treated as an object giving it extreme portability. And the best part is that Python is part of the open source community! Python has been around since the 90's and is included in most native Linux distributions. It is also available for Windows.

If you are a home user of mathematical software (like most of us here) such as MatLab you will quickly find a hole in your wallet after buying a full version of MatLab. And of course, shame on those who use pirated software. Python supports very similar functionality as MatLab from free downloadable modules. Because the structure of Python scripts calls for "import" keywords (much like C's include) each module can be loaded into memory as required.

Here's an example:

Simple Plot Small
[Edit: LOL it fell foul of four hundred]

from pylab import *

t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s, linewidth=1.0)

xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
show()


Here's a link to the mirror module for MatLab plotting:
http://matplotlib.sourceforge.net/screenshots.html

So in conclusion, if you like MatLab but can't afford it, Python is an alternative, if not better, solution.
Back to top
WaveRider
Tue Nov 20 2007, 06:33PM
WaveRider Registered Member #29 Joined: Fri Feb 03 2006, 09:00AM
Location: Hasselt, Belgium
Posts: 500
If you like the maths capability of MatLab, why not try out Octave ? I use it all the time... It is not quit compatible with matlab and the graphics are based on Gnuplot, so it may feel a little less polished than MatLab, but its functionality is excellent.. I use it regularly at work for things as diverse as S parameter extraction and fractional-N PLL simulation...

Back to top
Hazmatt_(The Underdog)
Tue Nov 20 2007, 07:30PM
Hazmatt_(The Underdog) Registered Member #135 Joined: Sat Feb 11 2006, 12:06AM
Location: Anywhere is fine
Posts: 1735
That's the same exact script for a sine plot in Matlab with only a couple of differences, so basically its free Matlab.

I struggled for a bit with Matlab and the student version. I had to buy the Control Systems Toolbox, ran me $65 for student insted of $5000 for a full version of the toolbox.
This is why you make friends at college and get hacked versions of Matlab and PSpice though.
Back to top
nrhoades
Tue Nov 20 2007, 09:30PM
nrhoades Registered Member #610 Joined: Wed Mar 28 2007, 09:44PM
Location: Middletown, RI
Posts: 110
get hacked versions of Matlab and PSpice

There are two sides to piracy:
1) Piracy should be considered completely unacceptable and violators prosecuted to the full extent of the law.
2) All software should be considered free (like before the days of Bill Gates) and people who want to make a living off of proprietary software have chosen a poor path and are blank out of luck.

Both arguments are far-fetched this day in age. So it basically comes down to the value of the person's time. If a programmer has talent and loves programming and he makes great things for everybody to use for free then thats great. If the same type of person needs to support his family, pay his bills, and adopt a child from Nigeria, then he needs to be compensated for his time. Same goes for any profession really.

The way I view it is that people who write software like Octave do it as a generous contribution to society. People who work for Mathworks writing MatLab software are probably not writing Octave software because they need money. And I'm sure the majority of talented programmers are getting paid.

I still use pirated software, but I'm trying to not use it as much. If I can find an open source version of what I need then I feel slightly more justified morally. I guess what I am saying is that it is easy not to care, but then again everyone on this forum is here because they enjoy difficulties.
Back to top
Steve Ward
Tue Nov 20 2007, 09:57PM
Steve Ward Registered Member #146 Joined: Sun Feb 12 2006, 04:21AM
Location: Austin Tx
Posts: 1055
I should check this out on my own, but... does it have any built in stuff like MATLAB has for various toolboxes, etc? I use simulink and the control systems stuff in matlab a lot, and probably wouldnt be able to write something of my own for that kind of work. For now the school provides me with a full license of MATLAB, so i have little motivation to check out other stuff, but in 5 months i will be singing a different tune.
Back to top
nrhoades
Tue Nov 20 2007, 11:09PM
nrhoades Registered Member #610 Joined: Wed Mar 28 2007, 09:44PM
Location: Middletown, RI
Posts: 110
I believe there are modules mirroring the toolbox. The Python community is mostly made of engineers so I'm pretty sure they're on top of it. I just bought a new PC so I'm going to be looking for them soon.
Back to top
Hazmatt_(The Underdog)
Wed Nov 21 2007, 01:40AM
Hazmatt_(The Underdog) Registered Member #135 Joined: Sat Feb 11 2006, 12:06AM
Location: Anywhere is fine
Posts: 1735
Matlab was originally a free open source government project, then the Mathworks evolved it into what it is now today, which is way it isn't free.

I'm not advocating stealing, I am pointing out that it is the reality of the student's situation. Sometimes you just can't avoid needing your own copy.

If I could purchase a full version from my college as a student license I would have.
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.