[Simulink] How to set array in mask and assign first index value to a block

3 visualizaciones (últimos 30 días)
Hello,
I would like to set an array in the mask parameter and access the values by index. For example in mask the parameter value is ConstantValue = [1 2 3]
Inside the masked block, I assign the first index to a constant block Value = ConstantValue[0] => 1
Please suggest how I can do so?
Thank you

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 7 de Jul. de 2017
Just index into the mask parameter:
  2 comentarios
Mohammed Shameem Hussain
Mohammed Shameem Hussain el 7 de Jul. de 2017
Hi I did try that as shown in the picture Mask :
The parameter of the constant:
Error message :
What should change ?
Mohammed Shameem Hussain
Mohammed Shameem Hussain el 7 de Jul. de 2017
Hi,
I got my mistake In matlab index starts from 1 , I got confused as I am programing for hardware.
Thank you

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Author Block Masks en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by