Effacer les filtres
Effacer les filtres

How to specify Dimension of a Bus Object element?

9 vues (au cours des 30 derniers jours)
Jerry Girard
Jerry Girard le 25 Août 2015
Commenté : Gergely Bencsik le 20 Oct 2021
How can I use a MATLAB Variable or Parameter to specify the Dimensions of a Bus Object bus element?
Everything is defined in the same Data Dictionary. When I type the name of my Variable or Parameter for into Dimension field of a bus element, the Bus Editor gives the error message: "Undefined function or variable."
Seems silly that I am reduced to using "magic numbers" to specify the dimensions of certain common bus elements.
Using 2015a. Thanks.
  3 commentaires
Daniel
Daniel le 30 Avr 2020

Is this still a known bug? I seem to be having the same issue in 2019b.

Gergely Bencsik
Gergely Bencsik le 20 Oct 2021
I have the same issue, 2020a.
I want to specify the dimension of bus-elements using a parameter that is also parametric in code-generation.
However, I can't specify any parameter in bus editor, only literal 'magic' constants.

Connectez-vous pour commenter.

Réponses (2)

Varun Bhaskar
Varun Bhaskar le 27 Août 2015
Hi,
This is a known issue and is being looked into by the development team. The workaround is to set the dimensions via the command line and the change should reflect in the bus editor.
  1 commentaire
Jerry Girard
Jerry Girard le 27 Août 2015
I tried to modify the bus element dimensions progmatically, and it did not work. I wanted to set the value to a text string that matches the name of my parameter holding the value. My parameter is already defined in the data dictionary. I got this error:
"Invalid 'Dimensions' property specified. This property must be a double vector consisting of positive elements. Further, for signals of greater than 2 dimensions, the trailing dimension cannot have a value of 1"
Do you know how to do what you are recommending? Can you provide a working example?

Connectez-vous pour commenter.


Rusczak
Rusczak le 22 Fév 2017
I still have this issue in 2016b, is there any plan to fix it ?

Catégories

En savoir plus sur Event Functions dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by