Why do I receive an error when using the LIMIT function to determine the limit of a vector of symbolic equations within the Symbolic Math Toolbox?

1 view (last 30 days)
For example, when I execute the following command:
syms s
v = [1/s; s; 1/s];
L = limit(v, 0);
I receive the following error message:
??? Insufficient outputs from right hand side to satisfy comma separated
list expansion on left hand side. Missing [] are the most likely cause.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in the LIMIT function within the Symbolic Math Toolbox in the way it handles vectors of undefined limits.
Currently, to work around this issue, you can make a slight modification to the sym/limit.m file by performing the following steps.
1) Open sym/limit.m by typing
edit sym/limit
in the MATLAB Command Window.
2) Save this file as "limit.m.old".
3) Change the last line of the function from:
if ~isempty(k), r(k).s = 'NaN'; end
to:
if ~isempty(k), [r(k).s] = deal('NaN'); end
4) Save this file as "limit.m".

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

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

Start Hunting!