In my embedded Matlab Function where i programmed with
matlab R2006b. I have the following problem:
When i run it in normal mode, all is ok, but when i do it
in external mode (real time) i get error message like:
1- Failed to eliminate a use of the MATLAB
function 'bin2dec'.
For non-simulation builds, uses of unsupported MATLAB
functions are eliminated if they do not effect the function
outputs.
or:
2- Failed to eliminate a use of the MATLAB
function 'num2str'.
For non-simulation builds, uses of unsupported MATLAB
functions are eliminated if they do not effect the function
outputs.
I do not understand why! May be some setting or simulation
parameters are wrong !!
thanks in advance for your help
PS: Sorry for my english
Abbas,
The problem is that neither of those functions, BIN2DEC or NUM2STR,
are supported by Embedded Matlab for code generation. Search Matlab
help for "Embedded MATLAB Run-Time Function Library" for a list of
supported functions.
HTH,
Ashish.
I just tell you that i used both eml.extrinsic
('bin2dec','num2str') and feval, with out success ! Is
there an other way to declare these functions or do i have
simply to try some other function ? But which one ?
ABBAS
x = sum((S - '0').*pow2(length(S)-1:-1:0));
NUM2STR is harder. For this I might try eml.ceval('sprintf',...), but there
are the matters of removing the null terminator and managing the what would
normally be a variable length output as one of fixed length (Embedded MATLAB
doesn't support variable size arrays).
--
Mike
"berberat " <tab...@yahoo.fr> wrote in message
news:fdaeb5$78m$1...@fred.mathworks.com...
berberat
I do take "requests". Somebody asked for typecast here, and I got it into
the next release. Please understand that there are some things I cannot do
yet (e.g. FIND) because we don't have dynamic sizing, and big, complicated
functions cannot be done so quickly.
--
Mike
"berberat " <tab...@yahoo.fr> wrote in message
news:fdd4dc$6e0$1...@fred.mathworks.com...
Hi, everyone...
I am the beginner in matlab..
I need to use matlab to make the simulation of my machine..
I have made the modelling and i want to try in simulink, is
my modelling correct or not? (i will see the result by the
graph).
I used the Embedded Matlab Fcn block to put my formula into
the simulink. But, when I want to run the simulink, there is
the interruption window that said
“Error using ==> stateflow\private\slsf
Error using ==> stateflow\private\autobuild_kernel
Error using ==> stateflow\private\targetman
Error using ==> cd
Cannot CD to C:\Program Files\MATLAB71\work\sfprj\ (Name is
nonexistent or not a directory).”
I don’t know what should I do with this condition..I am
really glad with your helping answer...
Thank you very much for all of your help, everyone..
-Sarah-
>