Prev: Simulink subsystem with multiple action ports
Next: subsctract two column vectors without for loop
From: Robert on 12 Aug 2010 03:57 "David Comboni" <david_comboni(a)go.com> wrote in message <hkrdfd$huk$1(a)fred.mathworks.com>... > Hi, > Peter Perkins wrote in message: > > > > Miguel, if you have access to the Statistics Toolbox, you may find nominal and ordinal arrays helpful, depending on what you want to do. If you're looking for a better way to store discrete data than using coded integers, or using cell arrays of strings, they may be what you want. If you're looking for a way to create named constants, perhaps this is what you're looking for: > > > > <http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_oop/bru76zw-1.html> > > > Hi, > > Miguel, if you have access to the Statistics Toolbox, you may find nominal and ordinal arrays helpful, depending on what you want to do. If you're looking for a better way to store discrete data than using coded integers, or using cell arrays of strings, they may be what you want. If you're looking for a way to create named constants, perhaps this is what you're looking for: > > > > <http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_oop/bru76zw-1.html> > > Searching for an answer to enumeration I bumped out with this thread. So I would like to add a question to this one. Matlab has an option to define enumeration instanciating it with Simulink: > > classdef(Enumeration) PrimaryColors < Simulink.IntEnumType > enumeration > Red(1), > Blue(4), > Yellow(8) > end > end > > Does this work when you are programming in Matlab and want to use this class? > > Thanks, > David without simulink derive your enum from an integer data type: classdef(Enumeration) ENUMTriplets < int32 enumeration Huey (0) Dewey (1) Louie (2) end end Cheers, Robert
|
Pages: 1 Prev: Simulink subsystem with multiple action ports Next: subsctract two column vectors without for loop |