engEvalString source code, Matlab

Hello, I'm looking for the source code for the engEvalString function in matlab. I need to see what this functions doing and possible change it to get it to do what I want. The functions found in engine.h but there’s nothing really there. When you use this to call something from Java it converts everything to doubles, and I need to be able to cast it to other values. I've googled for a little bit and I didn't run across anything. I’ve even searched for it in my matlab directory. I didn't know if anyone here knows where I can look. Thanks!

 Accepted Answer

Kaustubha Govind
Kaustubha Govind on 22 May 2012
engEvalString is defined in the shared library or DLL named "libeng" - engine.h is simply where the declaration resides. The function is IP-protected, so you can't modify it, but feel free to create your own wrapper to do the required type-casts before calling into engEvalString.

6 Comments

I still do not understand your problem. Do you want to modify the inputs or outputs of engEvalString? I cannot imagine any scenario where modifying engEvalString itself could be useful.
Lucas: You need to use:
engEvalString('Engine *', 'In1=int32(10)');
To create In1 as an int32 variable. By default, MATLAB uses double datatype for statements like "x=2" - this has nothing to do with engEvalString.
You can post pictures in this forum. See e.g. http://www.mathworks.com/matlabcentral/answers/243-how-do-i-post-a-picture-with-my-question
Do I understand correctly that your problem is an unwanted conversion to DOUBLE in a Simulink model? Then your problem does not concern engEvalString at all, but casting in Simulink?
@Kaustubha: What is IP-protection?
@Jan: in this context, "IP" is "intellectual property" -- that is, the routine is unpublished internal MATLAB code that Lucas will not be able to get the source for.
Thanks, Walter! I've been confused by the large number of terms abbriviated by "I.P.".

Sign in to comment.

More Answers (0)

Categories

Products

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!