필터 지우기
필터 지우기

Object oriented programming in MATLAB

조회 수: 3 (최근 30일)
Anushka Perera
Anushka Perera 2011년 9월 29일
댓글: denbud 2014년 3월 2일
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?

답변 (1개)

Rick Rosson
Rick Rosson 2011년 9월 29일
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
kasra
kasra 2011년 11월 16일
the only thing i found in simpower was "hydro turbine with governer" nothing else !
denbud
denbud 2014년 3월 2일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by