Where do i add a loadlibrary command in a class definition?
Mostrar comentarios más antiguos
Hi,
i want to write a Matlab class file which implemtens functions provided by a library. This library contains functions which enable Matlab to read simulation results without the need to open the simulation software. So i want to create objects which contain the simulation results. My question is: Is it possible or does it even make sense to load the library in the class defintion? Where in the class defintion do i load the library?
Thanks for your help.
3 comentarios
Kaustubha Govind
el 13 de Mayo de 2013
Not sure if I understand your question correctly, but shouldn't you load the library in the method where you are calling into it? Or did you want to load it in the class constructor, unload it in the class destructor; and assume that it is loaded in all methods?
Cedric
el 13 de Mayo de 2013
I am not sure either that I fully understand .. do you want to "pass the library dynamically" to some method of objects instantiated from your new class so they can each use a different library?
Florian
el 17 de Mayo de 2013
Respuestas (2)
David Sanchez
el 13 de Mayo de 2013
0 votos
It seems you are trying to do Object-Orientated Programming. If so, these two links might be of help.
1 comentario
Florian
el 13 de Mayo de 2013
David Sanchez
el 13 de Mayo de 2013
0 votos
You do not have to load your libraries, your functions have to be saved as .m files in the working directory. Matlab looks for them automatically.
Categorías
Más información sobre Call C from MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!