About Matlab Programming

Question about how to start in matlab

Page 1 of 1

3 Replies - 2573 Views - Last Post: 18 January 2008 - 07:21 PM Rate Topic: -----

#1 makaialexa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 12-May 06

About Matlab Programming

Post icon  Posted 09 January 2008 - 04:08 PM

Does any1 knows where should I start to search or what should I read for learning.

I want to develop my graduating project from the University...

Any comments or advice? :wub: :wub:

Is This A Good Question/Topic? 0
  • +

Replies To: About Matlab Programming

#2 jjhaag  Icon User is offline

  • me editor am smartastic
  • member icon

Reputation: 48
  • View blog
  • Posts: 1,789
  • Joined: 18-September 07

Re: About Matlab Programming

Posted 09 January 2008 - 04:25 PM

Well, that sort of depends on whether you have any previous programming experience. Mathworks maintains a series of video tutorials as well as text-based tutorials on their main site.

If you already know some programming, then running through a few of these to familiarize yourself with the environment is probably good enough as a start. If you've never programmed before, go through all of them in sequence.

The best thing you can do for yourself is to get programming. Reading about it or watching vid tuts is a good start, but you won't really know how much you know until you get right into it.

Once you've gotten somewhat familiar with the environment and the language, start small - build a project that captures some sub-component of your overall project, with minimal functionality, just so you can figure out how to implement what you're going to need. This will also allow you to figure out what you have NO clue about, so you can ask clear, pointed questions (here at </dic> ;) ) and get faster and more useful responses.


In any event, it might be helpful if you can provide some details about what you're going to be doing in MATLAB - serial communications for data logging? numerical simulations? image processing? statistics? If you can provide some more details about the project, as well as your level of experience programming, we can probably make some more directed suggestions.

Hope that helps :)
Was This Post Helpful? 0
  • +
  • -

#3 makaialexa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 12-May 06

Re: About Matlab Programming

Posted 18 January 2008 - 06:22 PM

I already have experience in programming: Some cellular automata with C (like Conway's game of life), some Java apps, and some web applications with .NET and JSP.

Good to start with MATLAB right? :rolleyes: :rolleyes: B) ;)

The project's title is "simulation of laminar flow in rectangular canals for fluid mechanics' students"... (sort of... because I originally don't speak in english, so this is the best translation), I will use FEA and my teacher said to me that the best tool for it is MATLAB. So I want to get the maximum power in that SW!!!!! :sly:


:D :D :D :D :D :D :D
Was This Post Helpful? 0
  • +
  • -

#4 jjhaag  Icon User is offline

  • me editor am smartastic
  • member icon

Reputation: 48
  • View blog
  • Posts: 1,789
  • Joined: 18-September 07

Re: About Matlab Programming

Posted 18 January 2008 - 07:21 PM

MATLAB is reasonably similar in syntax and structure to C - you probably won't have too much of a problem picking it up. And any cases involving 2- or 3-D modelling are well suited to the MATLAB environment, because of the array-based nature of the language - matrix operations are the default behavior of the system. Since you have a familiarity with other languages, I'd say that your time would be best served playing around a little bit with simple systems and reading over a few of the MathWorks tutorials until you're reasonably comfortable with the syntax, and then dive right into your project.

HOWEVER...as far as performance goes, you'll be taking a serious hit in comparison to compiled languages like C, since MATLAB is an interpreted scripting language. For my own work, which dealt with automata, interacting particle systems, and the like, porting models from MATLAB to C usually resulted in performance gains of 50-1000x, depending on the operations involved.

So depending on the exact implementation you're using, you can expect an increase in computation time on that same order compared to what you might expect in C. More recent releases have certainly done a lot to improve performance, and you may also be able to recoup some of those performance costs by using the MATLAB C Compiler (mcc) to compile your code back down to C. This can be used to create a standalone executable from your m-files - a useful trick if you need it.

This is not to discourage you from using MATLAB in any way - I think that it's a great language and environment, and if you don't mind taking a performance hit, it's hard to beat for scientific computing. This is just to warn you that you may be in for some surprises with how long your simulations will take, especially compared to a "performance" language like C.


Hope that helps to answer some of your questions. If you've got more specific questions about getting into MATLAB, feel free to post them here, as well as any issues that you may come across when you start coding :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1