App designer error-Error using indexing Dot indexing is not supported for variables of this type.
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Brahmadev
el 25 de Sept. de 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 comentarios
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!