getValue - Get value of property from element instance - MATLAB (original) (raw)

Get value of property from element instance

Syntax

Description

[[value](#mw%5Fad4cf7b3-e66b-409f-be28-5d619d9e1c2b),[unit](#mw%5Ff5b5d6fa-b2e6-4a1e-b519-793d726b4b8f)] = getValue([instance](#mw%5F182ac053-f5a3-460f-a9ac-6f7e9f7e260c%5Fsep%5Fmw%5Ffd80c2a3-7723-4e5a-911b-df3b748c69dd),[property](#mw%5F182ac053-f5a3-460f-a9ac-6f7e9f7e260c%5Fsep%5Fmw%5Fab25b719-b6a2-4a8d-807d-27a851db81c4)) obtains the property property of the instanceinstance and assigns it to the specified valuevalue.

Note

This function is part of the instance programmatic interfaces that you can use to analyze the model iteratively, element-by-element. The instance refers to the element instance on which the iteration is being performed.

example

Examples

collapse all

Load the small unmanned aerial vehicle (UAV) model, create an architecture instance, and get the mass property value of a nested component.

openProject("scExampleSmallUAV"); model = systemcomposer.loadModel("scExampleSmallUAVModel"); instance = instantiate(model.Architecture,"UAVComponent","NewInstance"); [massValue,unit] = getValue(instance.Components(1).Components(1),... "UAVComponent.OnboardElement.Mass")

Input Arguments

collapse all

Property, specified in the form "<profile>.<stereotype>.<property>".

Data Types: char | string

Output Arguments

collapse all

Property value, returned as a data type that depends on how the property is defined in the profile.

Property unit, returned as a character vector that describes the unit of the property as defined in the profile.

Example: 'kg'

Data Types: char

More About

collapse all

Term Definition Application More Information
Analysis Static analysis analyzes the structure of the system to quantitatively evaluate an architecture for certain characteristics. Static analysis uses an analysis function and parametric values of properties and parameters captured in the system model. Use analyses to calculate overall reliability, mass roll-up, performance, or thermal characteristics of a system, or to perform a size, weight, and power (SWaP) analysis to increase efficiency. Analyze Architecture Model Properties with Analysis FunctionAnalyze ArchitectureSimple Roll-Up Analysis Using Robot System with Properties
Analysis function An analysis function is a MATLAB® function that computes values necessary to evaluate the architecture using the properties of each element in the model instance and instance-specific parameters at the component and architecture levels. Use an analysis function to calculate the result of an analysis. Analysis Function ConstructsWrite Analysis Function
Instance model An instance model is a collection of instances. You can update an instance model with changes to a model, but the instance model will not update with changes in active variants or model references. You can use an instance model, saved in a MAT file, of a System Composerâ„¢ architecture model for analysis. Run Analysis Function
Instance An instance is an occurrence of an architecture model element at a given point in time. An instance freezes the active variant or model reference of the component in the instance model. Create a Model Instance for Analysis

Version History

Introduced in R2019a

See Also

Tools

Functions

Objects

Topics