How to write properties in vectors in matlab oop?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
kanuri venkata mohana
am 1 Sep. 2020
Kommentiert: kanuri venkata mohana
am 1 Sep. 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 Kommentare
Akzeptierte Antwort
per isakson
am 1 Sep. 2020
P(1)=obj.lcc;
P(2)=obj.rc;
P(3)=obj.mc;
where obj is the instance variable
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!