App designer error-Error using indexing Dot indexing is not supported for variables of this type.
2 views (last 30 days)
Show older comments
I am now using app designer to create an GUI to simulate my simulink file. Here is my code:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1021355/image.png)
I want to export the Editfield.value to the block in my simulink file as below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1021360/image.png)
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 Comments
Answers (1)
Brahmadev
on 25 Sep 2023
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 Comments
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!