Swedish flagChinese (Simplified) flagEnglish flagGerman flagFrench flagSpanish flagHindi flag
June
19
2009
2

Programming Matlab

I have worked with a Matlab program during my summer job. The power of Matlab is that it is a very simple language which is a higher abstraction level than, say, Java. For it must be added that the language is very simple when it comes to performing calculations, solving differential equations, numerical counts, simulations and so on. A disadvantage, resulting from the high level of abstraction, however, is that it is rather slow. You have to take great care of when coding.

Matlab built with version 2008a on java. You can drive most of the features in Java by Matlab function (there are also other functions in the same genre):

  javaMethodEDT ('Class or object of class', 'methodName', ..., Params) 

From Matlab's 2008 version, you can also create classes and objects, which simplifies and creates very structure. The syntax is quite far from java and much is inherited from the previous Matlab versions, which initially makes it a bit awkward. I will in a series of articles presenting some tips and tricks for Matlab programming.

  • I will go through the GUI in the form of another tree, and controls. These functions are handled by Matlab uicontrol and uitree, which is a rewrite of the Java components, JTree and JButton, JTextField, etc.. In this context, I take up outsourcing of components, which can be done manually and with Matlab's built-in software guide.
  • I will return to Matlab's get and set methods, which is a bit complicated but very good when working with objects.
  • I go through Matlab functions to save objects and explains why it is wiser to save the data in form of data structures.
  • Finally, I also consider the so-called Callbacks and function ode45, which is useful in solving differential equations. Ode45 can inter alia be used to simulate dynamic systems of various kinds. One example is the power network behavior at various ratios.

I see myself now as a good Matlab programmer with experience in two projects. For more information about me and my mission, please contact the david@techonomics.se . I have f-tax and bill per assignment or charge by the hour.

The theme is modified from Aeros 2.0 - Blogglista.se - Translation is made ​​by N2H