How to write properties in vectors in matlab oop?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
kanuri venkata mohana
el 1 de Sept. de 2020
Comentada: kanuri venkata mohana
el 1 de Sept. de 2020
Hi guys,
I want to optimize my model. i have properties like mc,lcc,rc,etc., i need to assign them to a optimisation variable "P" which should be in the form of vector.for example
P(1)=lcc;
P(2)=rc;
P(3)=mc;
i need to assign my properties in this way. Can anyone tell me how write them in a correct way in OOP?
Any suggestions are appreciated.
Thankyou.
0 comentarios
Respuesta aceptada
per isakson
el 1 de Sept. de 2020
P(1)=obj.lcc;
P(2)=obj.rc;
P(3)=obj.mc;
where obj is the instance variable
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!