フィルターのクリア

Lookup table object from another object

2 ビュー (過去 30 日間)
Thomas LE DIOURON
Thomas LE DIOURON 2024 年 3 月 1 日
回答済み: Pramil 2024 年 3 月 27 日
I have an object (from a specific class) that contains a structure of lookup tables:
taxi =
TaxiProfile with properties:
data: [6×5 double]
waitingStruct: [1×1 struct]
distances: [6×1 double]
distancesCumul: [6×1 double]
velocities: [6×1 double]
slopes: [6×1 double]
windSpd: [6×1 double]
lookupTables: [1×1 struct]
>> taxi.lookupTables
ans =
struct with fields:
velocities: [1×1 Simulink.LookupTable]
slopes: [1×1 Simulink.LookupTable]
windSpd: [1×1 Simulink.LookupTable]
I would like to use this object to reference the different lookup tables in a Simulink 1-D Lookup Table. In the "Data Specification", I select "Lookup table object" and in the name: "taxi.lookupTables.velocities"
In this case, there is an error "Invalid setting in '1-D Lookup Table' for parameter 'LookupTableObject'
By setting the following variable and specifying only velocities in the field name of the Data Specification of the 1-D Lookup table, it works
velocities = taxi.lookupTables.velocities
Is it a bug?
  2 件のコメント
Thomas LE DIOURON
Thomas LE DIOURON 2024 年 3 月 1 日
Fangjun Jiang
Fangjun Jiang 2024 年 3 月 2 日
Type taxi.lookupTables.velocities in Command Window to see what it is? The dimension could be different. Is it a 1-D lookup table?

サインインしてコメントする。

回答 (1 件)

Pramil
Pramil 2024 年 3 月 27 日
Hi Thomas, It is not a bug.
As of MATLAB R2023b, it is not possible to directly reference a “Lookup Table” object through another object. This limitation arises because the “Lookup Table” object must be defined in the workspace for it to be referenced in the block parameters.
Hope it helps.

カテゴリ

Help Center および File ExchangeLookup Tables についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by