Undefined function 'fimplicit' for input arguments of type 'sym'

3 次查看(过去 30 天)
The following example program is available in the 'Solve System of Algebraic Equations': (link: https://in.mathworks.com/help/symbolic/solve-a-system-of-algebraic-equations.html) But whenever run this program in matlab, it replies with an error "Undefined function 'fimplicit' for input arguments of type 'sym'." How to solve it???
syms x y eqn1 = sin(x)+cos(y) == 4/5; eqn2 = sin(x)*cos(y) == 1/10; a = axes; fimplicit(eqn1,[-2*pi 2*pi],'b'); hold on grid on fimplicit(eqn2,[-2*pi 2*pi],'m'); L = sym(-2*pi:pi/2:2*pi); a.XTick = double(L); a.YTick = double(L); M = arrayfun(@char, L, 'UniformOutput', false); a.XTickLabel = M; a.YTickLabel = M; title('Plot of System of Equations') legend('sin(x)+cos(y) == 4/5','sin(x)*cos(y) == 1/10', 'Location', 'best')
Please help me....

采纳的回答

Steven Lord
Steven Lord 2016-12-9
That function was introduced in release R2016b of Symbolic Math Toolbox. You're probably using an earlier release. Looking at the "Functionality being removed or changed" table, in earlier releases you can use ezplot. Note, however, that the syntax of those two functions may be different and ezplot may not have all the functionality of fimplicit.
  2 个评论
huazai2020
huazai2020 2020-7-4
This is my codes:
clc; clear all;
A=[2 1;1,2]; %Ellipse equation matrix
y=[1;0.5]; %External point
Aroot=chol(A);
L=Aroot\eye(2);
z=Aroot\trustregprob(L.'*L, L.'*y,1);
ellipsefun=@(p,q) sum([p;q].*(A*[p;q]))-1 ;
hold on
ezplot(ellipsefun, [-1 1.3 -1 1.3])
plot(y(1),y(2),'rx',z(1),z(2),'bo');
axis equal
hold off
I use the ezplot, but it gives me some errors below, what is the reason?
Warning: Function failed to evaluate on array inputs; vectorizing the function may
speed up its evaluation and avoid the need to loop over array elements.
> In specgraph\private\ezplotfeval at 57
In ezplot>ezimplicit at 258
In ezplot at 154

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numbers and Precision 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by