mrkrd / matlab_wrapper

Easy to use MATLAB wrapper for Python
GNU General Public License v3.0
78 stars 23 forks source link

how to read a detector or .m function from matlab? #30

Open kimiya66 opened 5 years ago

kimiya66 commented 5 years ago

As I could not find a clear documentation on funcation and method for matlab_wrapper. firstly I want to ask where can I find a tutorial or at leat list of functions for this library. I wonder what I could do with that exactly? secondly is this Eval method for reading a function from matlab or just arrays?what is the exact input argument for matlab.Eval()?? last question is if I want to read a function(.m file) from matlab which is working with a detector(struct array), what method matlab_wrapper offers here?

Thank you in advance,

mrkrd commented 5 years ago

As I could not find a clear documentation on funcation and method for matlab_wrapper.

The methods themselves are documented in docstrings.

firstly I want to ask where can I find a tutorial or at leat list of functions for this library. I wonder what I could do with that exactly?

You can start in README: https://github.com/mrkrd/matlab_wrapper#usage

And check out examples: https://github.com/mrkrd/matlab_wrapper/tree/master/examples

secondly is this Eval method for reading a function from matlab or just arrays?what is the exact input argument for matlab.Eval()??

Try help(matlab.eval)

last question is if I want to read a function(.m file) from matlab which is working with a detector(struct array), what method matlab_wrapper offers here?

I don't know what do you mean by "read a function".

kimiya66 commented 5 years ago

Thank you for your fast answer. now I made it and I could access to my matlab function. but the problem is when I write it to my python program after executing my python script I always got this error 'segmentation fault ' and program interrupted. Do you know what is this segfault happen when I try to bridge to matlab?(eg, by matlab.eval,...)

mrkrd commented 5 years ago

Thank you for your fast answer. now I made it and I could access to my matlab function. but the problem is when I write it to my python program after executing my python script I always got this error 'segmentation fault ' and program interrupted.

Do you know what is this segfault happen when I try to bridge to matlab?(eg, by matlab.eval,...)

I'm not able to help with the segmentation fault, because there are not enough details.

You might need to debug it by yourself.

You could start and see, if you were able to successfully run the example scripts with your setup?

https://github.com/mrkrd/matlab_wrapper/tree/master/examples

Marek