Object Oriented Programming, programming a subclass of a handle class

2 ビュー (過去 30 日間)
jj kihjk
jj kihjk 2016 年 10 月 12 日
編集済み: Adam 2016 年 10 月 13 日
So I have to program an OOP and I have to create a subclass of a handle class called CellArray. Problem is I don't know what a subclass of a handle class means and it says that the CellArray must only have the properties size and data. Can someone help me thanks.
  2 件のコメント
per isakson
per isakson 2016 年 10 月 12 日
編集済み: per isakson 2016 年 10 月 12 日
Adam
Adam 2016 年 10 月 13 日
編集済み: Adam 2016 年 10 月 13 日
If you are not even aware of what a property is you definitely need to do some reading about OOP in Matlab!

サインインしてコメントする。

回答 (1 件)

Ganesh Hegade
Ganesh Hegade 2016 年 10 月 13 日
This is the structure. classdef CellArray < handle properties %Write the properties if you want to use any EX: strName end methods functions %Write any functions which you want to use it many times. end; end end Once you are done with your class you can use this class in another classes by declaring it as: NewClass = CellArray();

カテゴリ

Help Center および File ExchangeCustomize Object Display for Classes についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by