各位可以在MATLAB命令行运行,看看每个指针的结果是什么:
myDictionaryObj = Simulink.data.dictionary.open('testDt.sldd');%获得数据字典的指针
dDataSectObj = getSection(myDictionaryObj,'Design Data');%获得数据段指针
fuelFlowObj = getEntry(dDataSectObj,'aaa');%获得数据指针
paramObj = fuelFlowObj.getValue();%获得数据结构体指针
运行结果:
fuelFlowObj =
Entry with properties:
Name: 'aaa'
Value: [1×1 Simulink.Parameter]
DataSource: 'testDt.sldd'
LastModified: '2025-Aug-07 01:23:04.828268'
LastModifiedBy: 'Administrator'
Status: 'Unchanged'
paramObj =
Parameter with properties:
GenericProperty: []
DoubleProperty: 0
Int32Property: 0
LogicalProperty: 0
CharProperty: ''
OnOffCharProperty: 'off'
ColorCharProperty: 'red'
Value: 10
CoderInfo: [1×1 Simulink.CoderInfo]
Description: ''
DataType: 'auto'
Min: []
Max: []
Unit: ''
Complexity: 'real'
Dimensions: [1 1]
然后按照常规,对paramObj进行操作即可