Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/Populate drop down menus with enums

Populate drop down menus with enums

PuTI / 2025-01-22
Populate drop down menus with enums
Matlab News

Hello all,
I trying to understand enumerations and how they are to be used in matlab. I have 2 questions:
1.: In C# I can just define enums in a class:
enum someSpecificValues { one = 1, two = 2, three = 3 }:
And later use them
var enumTest = someSpeficValues.one;
Now, what I understood from the MATLAB help is that I need to define each enum as a class and then call that from within my class. I am developing a driver library, where I need a couple of settings as enums. Do I really need to define them in that way or is there a way to define them within the class? Creating them inside the class has the added advantage that they’re confined to the class, where they make sense.
2.: Along with my driver I’d like to create some examples in the app creator, where I want to display these enumerated values as drop down menus, so people don’t just enter random values. Is there a way to link the drop down to the enumeration or would I have to write the values by hand and hope not to make an error? Again, in C# you could bind the drop down to the enum (technically, you’d bind to the list, but the effect is the same) and changes to the enum would be reflected on your UI.
I have tried to use the DropDown.Items property and realized this accepts string arrays and not enumerations. I don’t know how to correctly convert my enumeration, though. Suppose I have the class:
classdef readModes
enumeration
ZIF, SH, SHN, HDR, DD
end
end
Then the following would not work.
app.DropDown.Items = enumeration(readModes.ZIF);
But what does?Hello all,
I trying to understand enumerations and how they are to be used in matlab. I have 2 questions:
1.: In C# I can just define enums in a class:
enum someSpecificValues { one = 1, two = 2, three = 3 }:
And later use them
var enumTest = someSpeficValues.one;
Now, what I understood from the MATLAB help is that I need to define each enum as a class and then call that from within my class. I am developing a driver library, where I need a couple of settings as enums. Do I really need to define them in that way or is there a way to define them within the class? Creating them inside the class has the added advantage that they’re confined to the class, where they make sense.
2.: Along with my driver I’d like to create some examples in the app creator, where I want to display these enumerated values as drop down menus, so people don’t just enter random values. Is there a way to link the drop down to the enumeration or would I have to write the values by hand and hope not to make an error? Again, in C# you could bind the drop down to the enum (technically, you’d bind to the list, but the effect is the same) and changes to the enum would be reflected on your UI.
I have tried to use the DropDown.Items property and realized this accepts string arrays and not enumerations. I don’t know how to correctly convert my enumeration, though. Suppose I have the class:
classdef readModes
enumeration
ZIF, SH, SHN, HDR, DD
end
end
Then the following would not work.
app.DropDown.Items = enumeration(readModes.ZIF);
But what does? Hello all,
I trying to understand enumerations and how they are to be used in matlab. I have 2 questions:
1.: In C# I can just define enums in a class:
enum someSpecificValues { one = 1, two = 2, three = 3 }:
And later use them
var enumTest = someSpeficValues.one;
Now, what I understood from the MATLAB help is that I need to define each enum as a class and then call that from within my class. I am developing a driver library, where I need a couple of settings as enums. Do I really need to define them in that way or is there a way to define them within the class? Creating them inside the class has the added advantage that they’re confined to the class, where they make sense.
2.: Along with my driver I’d like to create some examples in the app creator, where I want to display these enumerated values as drop down menus, so people don’t just enter random values. Is there a way to link the drop down to the enumeration or would I have to write the values by hand and hope not to make an error? Again, in C# you could bind the drop down to the enum (technically, you’d bind to the list, but the effect is the same) and changes to the enum would be reflected on your UI.
I have tried to use the DropDown.Items property and realized this accepts string arrays and not enumerations. I don’t know how to correctly convert my enumeration, though. Suppose I have the class:
classdef readModes
enumeration
ZIF, SH, SHN, HDR, DD
end
end
Then the following would not work.
app.DropDown.Items = enumeration(readModes.ZIF);
But what does? matlab, app designer, enumeration, oop MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

Generate ST code from a look-up table with CONSTANT attribute
2025-05-22

Generate ST code from a look-up table with CONSTANT attribute

“no healthy upstream” error when trying to access My Account
2025-05-22

“no healthy upstream” error when trying to access My Account

MATLAB Answers is provisionally back?
2025-05-21

MATLAB Answers is provisionally back?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss