1. Catalogs
  2. The MathWorks
  3. MATLAB Classes and Object-Oriented Programming

MATLAB Classes and Object-Oriented Programming
1 /313Pages

MATLAB Classes and Object-Oriented Programming

MATLAB Classes and Object-Oriented Programming
1 /313Pages

Catalog excerpts

MATLAB Classes and Object-Oriented Programming-194

PropertiesStoringClassData iferIn>=0&&erIn<=100erIn=erIn.*obj.scalingFactor obj.expectedResult=erIn;elseobj.expectedResult=NaN;endend functioner=get.expectedResult(obj)er=obj.expectedResult/scalingFactor;endendend 6-16 >

 Open the catalog to page 194
MATLAB Classes and Object-Oriented Programming-231

ImplementingOperatorsforYourClass OperationMethodtoDefineDescription > a&band(a,b) LogicalAND > a|bor(a,b) LogicalOR > ~anot(a) LogicalNOT > a:d:ba:bcolon(a,d,b)colon(a,b) Colonoperator > a'ctranspose(a) Complexconjugatetranspose > a.'transpose(a) Matrixtranspose > commandwindowoutputdisplay(a) Displaymethod > [ab]horzcat(a,b,...) Horizontalconcatenation > [a;b]vertcat(a,b,...) Verticalconcatenation > a(s1,s2,...sn)subsref(a,s) Subscriptedreference > a(s1,...,sn)=bsubsasgn(a,s,b) Subscripted assignment > b(a)subsindex(a) Subscriptindex >

 Open the catalog to page 231
MATLAB Classes and Object-Oriented Programming-296

DesigningRelatedClasses DocStockClassProperties NameClassDefaultDescription > NumSharesdouble0 Numberofsharesofaparticularstock > SharePricedouble0 Currentvalueofasset PropertiesInheritedfromtheDocAssetClass > Descriptionchar'' Descriptionofasset > CurrentValuedouble0 Currentvalueofasset > Datechardate Datewhenrecordiscreated (setby > date function) > Typechar'' Typeofasset(stock,bond, savings) Thefollowingtablesummarizesthemethodsforthe > DocStock class. DocStockClassMethods NameDescription > DocStock Classconstructor > disp Displaysinformationabouttheobject > The > < symbolspecifiesthe > DocAsset...

 Open the catalog to page 296

All The MathWorks catalogs and technical brochures

  1. Stateflow

    8  Pages

  2. SimEvents

    7  Pages

  3. SimDriveline

    7  Pages

  4. SimHydraulics

    7  Pages

  5. SimRF

    6  Pages

  6. MATLAB Coder

    5  Pages

  7. OPC Toolbox

    5  Pages

  8. SimBiology

    6  Pages

  9. xPC Target

    5  Pages

  10. SimMechanics

    7  Pages

  11. Simscape

    7  Pages

  12. Simulink

    6  Pages

  13. MATLAB®

    6  Pages

*Prices are pre-tax. They exclude delivery charges and customs duties and do not include additional charges for installation or activation options. Prices are indicative only and may vary by country, with changes to the cost of raw materials and exchange rates.