Filter löschen
Filter löschen

Object oriented programming in MATLAB

3 Ansichten (letzte 30 Tage)
Anushka Perera
Anushka Perera am 29 Sep. 2011
Kommentiert: denbud am 2 Mär. 2014
I am a PhD student. I have been using MATLAB for 4 years for my academic work. My research area is systems and control engineering. Modeling, control and simulation of complex system (I was a chemical engineer) is my main interest. I must follow Object Oriented Programming facility in MATLAB if I am going to use MATLAB any further in my PhD. I followed http://www.mathworks.se/help/pdf_doc/matlab/matlab_oop.pdf but I couldn't find any useful guide to my work. I will explain what I need with an example. Let say I have to model a hydro power plant where there are several physical domains involved (mechanical, hydraulic, and electrical). Elements (generator, penstock, turbines, reading data from sensors, writing data into actuators, etc) in hydro power plants should be modeled separately. So object concept is a very useful when it goes to modeling and simulation of complex systems. I know that some programming languages like C#, Modelica, etc are possible to use. But I don't want to use them. I would rather like to work with MATLAB. But I am wondering how to manipulate MATLAB to fulfill my requirement. I want to move from MATLAB functions to MATLAB objects. I hope there may be a provision in MATLAB to model each element (pumps, motors, valves, fluid flows tubes, reactors, etc) in a complex process under object oriented concept. I don’t like to use Simulink. I prefer more flexible MATLAB coding. I have quite good understanding about MATLAB now. Can anybody have answer to my question?

Antworten (1)

Rick Rosson
Rick Rosson am 29 Sep. 2011
I would recommend Simulink. Most of what you are trying to model is already available in Simulink and add-on tools SimScape, SimMechanics, SimPowersystems, etc. There is no sense reinventing the wheel. If you know MATLAB, learning Simulink is noy excessively difficult.
Also, you can create your own Simulink blocks using MATLAB functions, and SimScape components using the SimScape language, which is very similar to MATLAB.
  2 Kommentare
kasra
kasra am 16 Nov. 2011
the only thing i found in simpower was "hydro turbine with governer" nothing else !
denbud
denbud am 2 Mär. 2014
Hi Rick Rosson, I am interested to create my own simulink blocks to make closed loop of rankine cycle consisting pump, vaporizer, turbine and condenser. Could you explain in detail about this and could you give any sources to learn in detail about transfering matlab code to simulink
Thanks

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Foundation and Custom Domains finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by