App designer error-Error using indexing Dot indexing is not supported for variables of this type.
7 次查看(过去 30 天)
显示 更早的评论
I am now using app designer to create an GUI to simulate my simulink file. Here is my code:
I want to export the Editfield.value to the block in my simulink file as below:
And finally display the outcome of simulink to my app designer.
Here is my problem:
(1)I cannot figure out what kind of the error in my first picture is.
(2)How can I export my value in text Editfield to simulink as well? The type of array seems to be not the same as single variable.
0 个评论
回答(1 个)
Brahmadev
2023-9-25
Hi Chiang,
I understand that you would like to use read Parameters from a masked block from Simulink in AppDesigner. You can use the following code to get the values of different parameters from the "Vehicle Body 1DOF Longitudinal" block mask.
% Button pushed function: Button
function goPushed(app, event)
MaskHandle = Simulink.Mask.get('testing_mask_parameters/Vehicle Body 1DOF Longitudinal');
disp(MaskHandle.Parameters.Value);
end
This will give you the Parameters as a comma seperated list.
You can refer to the following documentation “Control Masks Programmatically” for more information:
Hope this helps!
Best Regards,
Brahmadev
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!