Determined if input object array is heterogeneous - MATLAB Cody - MATLAB Central

Problem 45583. Determined if input object array is heterogeneous

Difficulty:Rate

Classes inherent from matlab.mixin.Heterogeneous can form arrays of heterogeneous elements, that is elements of different subclasses of the same superclass. Implement a function to determine if incoming vector is heterogeneous, i.e. a mix of more than one classes, or not.

e.g. the following code create a heterogeneous array of objects.

x = [rectangle, line];

so

y == true

Solution Stats

21.05% Correct | 78.95% Incorrect
Last Solution submitted on Oct 19, 2022

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers6

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page