Borrar filtros
Borrar filtros

Accessing struct variable using another variable.

1 visualización (últimos 30 días)
Xun Jing Toh
Xun Jing Toh el 28 de Mzo. de 2019
Editada: Xun Jing Toh el 28 de Mzo. de 2019
Hi, I will like to use another a variable to modify another variable like a pointer in C programming.
distance.rate = 10;
a = distance.rate.rate;
distance.rate.rate = 20;
a is still 10 but I want to make "a" link to "distance.rate.rate" is it possible?
I have many variable with really long name so it will be helpful to refer to it using a few letters.

Respuestas (0)

Categorías

Más información sobre Structures 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!

Translated by