Thread Subject: undefined function or variable 'sym'

Subject: undefined function or variable 'sym'

From: Montadar Taher

Date: 9 Apr, 2009 00:34:02

Message: 1 of 8

Hi my friends,

I did an integration between matlab and visual basic 6.0, i create the window in vb and did all the required code to run the window in a very good case.

Also, in matlab, i create my function and i used the comtool to build it. After that i added it in the references of visual basic and the vb do call for the function in a good case.

My problem, is that i received an error message in vb as ( undefined function or variable 'sym' ). in fact i never have such function or variable in my code (matlab and visual basic).

can some body help me?

Thank you in advance

Subject: undefined function or variable 'sym'

From: Montadar Taher

Date: 9 Apr, 2009 00:40:03

Message: 2 of 8

by the way,

when i run the function in matlab, it working very good.

thank you

"Montadar Taher" <muntather_moto@yahoo.com> wrote in message <grjfpq$n1a$1@fred.mathworks.com>...
> Hi my friends,
>
> I did an integration between matlab and visual basic 6.0, i create the window in vb and did all the required code to run the window in a very good case.
>
> Also, in matlab, i create my function and i used the comtool to build it. After that i added it in the references of visual basic and the vb do call for the function in a good case.
>
> My problem, is that i received an error message in vb as ( undefined function or variable 'sym' ). in fact i never have such function or variable in my code (matlab and visual basic).
>
> can some body help me?
>
> Thank you in advance

Subject: undefined function or variable 'sym'

From: Steven Lord

Date: 9 Apr, 2009 03:15:57

Message: 3 of 8


"Montadar Taher" <muntather_moto@yahoo.com> wrote in message
news:grjfpq$n1a$1@fred.mathworks.com...
> Hi my friends,
>
> I did an integration between matlab and visual basic 6.0, i create the
> window in vb and did all the required code to run the window in a very
> good case.
>
> Also, in matlab, i create my function and i used the comtool to build it.
> After that i added it in the references of visual basic and the vb do call
> for the function in a good case.
>
> My problem, is that i received an error message in vb as ( undefined
> function or variable 'sym' ). in fact i never have such function or
> variable in my code (matlab and visual basic).
>
> can some body help me?

Symbolic Math Toolbox (which is the toolbox of which SYM is part) is not
supported for use with MATLAB Compiler and will not work in a compiled
application.

http://www.mathworks.com/products/compiler/compiler_support.html

--
Steve Lord
slord@mathworks.com

Subject: undefined function or variable 'sym'

From: Nasser Abbasi

Date: 9 Apr, 2009 03:21:32

Message: 4 of 8


"Steven Lord" <slord@mathworks.com> wrote in message
news:grjp88$1o3$1@fred.mathworks.com...
>
> "Montadar Taher" <muntather_moto@yahoo.com> wrote in message

>in fact i never have such function or
>> variable in my code (matlab and visual basic).
>>

>
> Symbolic Math Toolbox (which is the toolbox of which SYM is part) is not
> supported for use with MATLAB Compiler and will not work in a compiled
> application.
>
> http://www.mathworks.com/products/compiler/compiler_support.html
>
> --
> Steve Lord
> slord@mathworks.com
>

Hello Steve;

If someone is not using syms in their maltab m files (as the OP says), how
why would the symbolic toolbox be involved? What you said, was my first
immediate reaction to the OP question, but then saw that he said he does not
use symbolic toolbox.

--Nasser

Subject: undefined function or variable 'sym'

From: Steven Lord

Date: 9 Apr, 2009 14:06:36

Message: 5 of 8


"Nasser Abbasi" <nma@12000.org> wrote in message
news:XQdDl.13787$hc1.1273@flpi150.ffdc.sbc.com...
>
> "Steven Lord" <slord@mathworks.com> wrote in message
> news:grjp88$1o3$1@fred.mathworks.com...
>>
>> "Montadar Taher" <muntather_moto@yahoo.com> wrote in message
>
>>in fact i never have such function or
>>> variable in my code (matlab and visual basic).
>>>
>
>>
>> Symbolic Math Toolbox (which is the toolbox of which SYM is part) is not
>> supported for use with MATLAB Compiler and will not work in a compiled
>> application.
>>
>> http://www.mathworks.com/products/compiler/compiler_support.html
>>
>> --
>> Steve Lord
>> slord@mathworks.com
>>
>
> Hello Steve;
>
> If someone is not using syms in their maltab m files (as the OP says), how
> why would the symbolic toolbox be involved? What you said, was my first
> immediate reaction to the OP question, but then saw that he said he does
> not use symbolic toolbox.

You're right, I skipped over that when I was reading the OP's question.
However, if they're receiving that message, then I suspect that either
they're calling SYM or SYMS but don't know it, or they're calling another
function (perhaps one written by someone else) that uses SYM or SYMS without
their knowledge.

Montadar, run your code inside MATLAB using the Profiler (see HELP PROFILE)
and look for any instances of SYM in the Profile report -- that should show
you if your code uses Symbolic Math Toolbox without you realizing it and
will show you where the dependency occurs.

--
Steve Lord
slord@mathworks.com

Subject: undefined function or variable 'sym'

From: Montadar Taher

Date: 10 Apr, 2009 20:21:01

Message: 6 of 8

Yes Friend,

i did the profile command and i found out that the sym was called many times as follows;
Function Name Calls Total Time Self Time* Total Time Plot
(dark band = self time)
sym.maple 1770 6.433 s 0.448 s
maple 3540 5.218 s 0.752 s
maplemex (MEX-function) 3559 4.225 s 4.185 s
sym.cosint 885 4.152 s 0.042 s
sym.double 885 2.666 s 0.138 s
sym.sym 3540 2.621 s 0.278 s
sym.sym>symr 1770 1.315 s 0.225 s
sym.sym>char2sym 1770 1.028 s 0.328 s
rat 2653 0.867 s 0.867 s
double.superiorfloat 71604 0.696 s 0.696 s
fliplr 28320 0.295 s 0.295 s
int2str 2700 0.183 s 0.183 s
sym.char 5310 0.171 s 0.171 s
waitbar 25 0.166 s 0.160 s
sym.sym>symfl 883 0.149 s 0.028 s
sym.sym>trim 1770 0.100 s 0.046 s
log10 12092 0.092 s 0.092 s
axis 9 0.079 s 0.061 s
str2num 885 0.075 s 0.042 s
newplot 32 0.071 s 0.007 s
newplot>ObserveAxesNextPlot 32 0.056 s 0.002 s
graphics\private\clo 8 0.054 s 0.016 s
cla 8 0.054 s 0.000 s
symbolic\private\putenvmaple (MEX-function) 1 0.050 s 0.050 s
sym.double>map2mat 885 0.045 s 0.045 s
setdiff 16 0.038 s 0.023 s
close 1 0.035 s 0.005 s
str2num>protected_conversion 885 0.033 s 0.033 s
ismember 9 0.030 s 0.030 s
close>request_close 1 0.030 s 0.007 s
title 6 0.023 s 0.018 s
close>request_close_helper 2 0.021 s 0.006 s
view 3 0.016 s 0.014 s
axis>LocSetEqual 3 0.015 s 0.015 s
ylabel 10 0.013 s 0.010 s
axescheck 29 0.013 s 0.013 s
xlabel 10 0.012 s 0.009 s
num2str 10 0.011 s 0.008 s
hold 3 0.008 s 0.006 s
figureToolbarCreateFcn 8 0.006 s 0.002 s
grid 5 0.005 s 0.005 s
xlim 5 0.005 s 0.005 s
opaque.char 8 0.004 s 0.004 s
angle 1512 0.003 s 0.003 s
colormap 1 0.003 s 0.003 s
ishold 6 0.003 s 0.003 s
gcf 75 0.003 s 0.003 s
iscellstr 24 0.003 s 0.003 s
newplot>ObserveFigureNextPlot 32 0.003 s 0.003 s
axis>LocSetLimits 3 0.003 s 0.003 s
FindST 1 0.002 s 0.002 s
gca 71 0.002 s 0.002 s
gcbf 2 0.002 s 0.000 s
gcbo 2 0.002 s 0.002 s
closereq 1 0.002 s 0.000 s
view>ViewCore 3 0.002 s 0.002 s
isunix 59 0 s 0.000 s
ispc 1 0 s 0.000 s
filesep 1 0 s 0.000 s
initprintexporttemplate 9 0 s 0.000 s
close>checkfigs 2 0 s 0.000 s
usejava 8 0 s 0.000 s
graphics\private\clo>find_kids 8 0 s 0.000 s
findall 8 0 s 0.000 s
view>isAxesHandle 3 0 s 0.000 s
axis>allAxes 9 0 s 0.000 s


now please help me to solve the problem, i need to do my program with visual basic 6, please help

Subject: undefined function or variable 'sym'

From: Steven Lord

Date: 10 Apr, 2009 20:49:15

Message: 7 of 8


"Montadar Taher" <muntather_moto@yahoo.com> wrote in message
news:gro9nd$kan$1@fred.mathworks.com...
> Yes Friend,
>
> i did the profile command and i found out that the sym was called many
> times as follows;

*snip profile output*

> now please help me to solve the problem, i need to do my program with
> visual basic 6, please help

As I said before, Symbolic Math Toolbox and SYM are not available for use
with MATLAB Compiler, which also means it won't work with any of the
deployment products that depend upon MATLAB Compiler. You can't deploy
M-files that use SYM objects.

--
Steve Lord
slord@mathworks.com

Subject: undefined function or variable 'sym'

From: Montadar Taher

Date: 10 Apr, 2009 21:04:01

Message: 8 of 8

"Steven Lord" <slord@mathworks.com> wrote in message <grobb4$81q$1@fred.mathworks.com>...
>
> "Montadar Taher" <muntather_moto@yahoo.com> wrote in message
> news:gro9nd$kan$1@fred.mathworks.com...
> > Yes Friend,
> >
> > i did the profile command and i found out that the sym was called many
> > times as follows;
>
> *snip profile output*
>
> > now please help me to solve the problem, i need to do my program with
> > visual basic 6, please help
>
> As I said before, Symbolic Math Toolbox and SYM are not available for use
> with MATLAB Compiler, which also means it won't work with any of the
> deployment products that depend upon MATLAB Compiler. You can't deploy
> M-files that use SYM objects.
>
> --
> Steve Lord
> slord@mathworks.com
>
Thank you

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
undefined funct... Montadar Taher 8 Apr, 2009 20:35:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com