From: Chris Sorrento on
Hello,
I wrote the following code to estimate cell (x) and substrate (s) concentrations:
Ks = 0.05; % (g/L) Saturation Constant
Yxs = 1; % (g/g) Yield Coefficient
MuMax = 2.3; % (hr-1) Max Specific Growth Rate
So = 1; % Initial Substrate Concentration
c = 2; % Cell Concentration Factor
alpha = 0.6; % Recycle Ratio based on volumetric flow rates
d = 0:0.1:6; D = d'; % (hr-1) Rate of Dilution
A = 1 + alpha - (alpha .* c);
Mu = D .* A; % Specific Growth Rate
%
% Equations:
syms s x
[s,x] = solve(s - ((Mu .* Ks) ./ (MuMax - Mu)), ...
x - ((Yxs .* (So-s)) ./ A)); % Substrate Conc and Cell Mass Conc

However, when I run this code, it gives me the following error:
??? Error using ==> maple at 129
at offset 10, `;` unexpected

Error in ==> sym.findsym at 33
v = maple('indets', sc ,'symbol');

Error in ==> solve at 99
vars = ['[' findsym(sym(eqns),neqns) ']'];

Error in ==> sym.solve at 49
[varargout{1:max(1,nargout)}] = solve(S{:});

Error in ==> AGACellRecycle at 13
[s,x] = solve(s - ((Mu .* Ks) ./ (MuMax - Mu)), ...

Could you please help? I have checked all the syntax many times and tried different variations of using the "solve" command. But still get the same error.
From: Walter Roberson on
Chris Sorrento wrote:

> syms s x
> [s,x] = solve(s - ((Mu .* Ks) ./ (MuMax - Mu)), ...
> x - ((Yxs .* (So-s)) ./ A)); % Substrate Conc and Cell Mass Conc
>
> However, when I run this code, it gives me the following error:
> ??? Error using ==> maple at 129
> at offset 10, `;` unexpected
>
> Error in ==> sym.findsym at 33
> v = maple('indets', sc ,'symbol');

Is it possible that you happen to have your own routine named "maple"?

which -all maple

Also, while you are doing that, double-check for indets
From: Chris Sorrento on
I did not write any routine named "maple." I am fairly new to Matlab but my understanding was that when I use the syms command then Matlab calls the maple.m file to solve the equations.

Walter Roberson <roberson(a)hushmail.com> wrote in message <7DFLn.28488$rU6.7514(a)newsfe10.iad>...
> Chris Sorrento wrote:
>
> > syms s x
> > [s,x] = solve(s - ((Mu .* Ks) ./ (MuMax - Mu)), ...
> > x - ((Yxs .* (So-s)) ./ A)); % Substrate Conc and Cell Mass Conc
> >
> > However, when I run this code, it gives me the following error:
> > ??? Error using ==> maple at 129
> > at offset 10, `;` unexpected
> >
> > Error in ==> sym.findsym at 33
> > v = maple('indets', sc ,'symbol');
>
> Is it possible that you happen to have your own routine named "maple"?
>
> which -all maple
>
> Also, while you are doing that, double-check for indets
From: Walter Roberson on
Chris Sorrento wrote:
> I did not write any routine named "maple." I am fairly new to Matlab but
> my understanding was that when I use the syms command then Matlab calls
> the maple.m file to solve the equations.

Yes, but please do us a favour and

which -all maple
which -all indets

You might not know that it is in your path.

I do not have the symbolic toolbox here, but it seems relatively likely
to me that instead of invoking maple.m that maple.p or a mex file would
be invoked. If that is correct and if maple.m is being executed instead,
it would probably indicate that the interface to maple is not properly
installed.

If you do come up showing maple.m then take a look at line 129 of it and
see what is there. If it looks like documentation instead of code then
that would be the help file and the evidence would be stronger that the
interface for maple is not properly installed.
From: Chris Sorrento on
Thanks Walter for helping me with this issue. I am not that familiar with Matlab so did not understand your indets command in your first email. Surprisingly, I did not find anything when I searched for indets in Help. But I do have Symbolic Math Toolbox installed. Also, when I run the commands that you suggested I get the following:
EDU>> which -all maple
C:\Program Files (x86)\MATLAB\R2007a Student\toolbox\symbolic\maple.m
C:\Program Files (x86)\MATLAB\R2007a Student\toolbox\symbolic\@sym\maple.m % sym method
EDU>> which -all indets
'indets' not found.
EDU>>

And lines 127-130 in maple.m are:

% Handle any error messages from Maple.
if status ~= 0 && nargout < 2
error('symbolic:maple:errmsg2',result)
end

So, I am not sure what is the significance of not finding "indets." What do you think?
Chris

Walter Roberson <roberson(a)hushmail.com> wrote in message <ElGLn.40813$wV.34922(a)newsfe11.iad>...
> Chris Sorrento wrote:
> > I did not write any routine named "maple." I am fairly new to Matlab but
> > my understanding was that when I use the syms command then Matlab calls
> > the maple.m file to solve the equations.
>
> Yes, but please do us a favour and
>
> which -all maple
> which -all indets
>
> You might not know that it is in your path.
>
> I do not have the symbolic toolbox here, but it seems relatively likely
> to me that instead of invoking maple.m that maple.p or a mex file would
> be invoked. If that is correct and if maple.m is being executed instead,
> it would probably indicate that the interface to maple is not properly
> installed.
>
> If you do come up showing maple.m then take a look at line 129 of it and
> see what is there. If it looks like documentation instead of code then
> that would be the help file and the evidence would be stronger that the
> interface for maple is not properly installed.