Problem with ezplot function and transcritical bifurcation, but not with other bifurcations

1 回表示 (過去 30 日間)
When running the script I get:
Error using ezplot (line 163) mu cannot be plotted in the xy-plane.
Error in sym/ezplot (line 76) h = ezplot(fhandle(f),varargin{:});
It does'n happen with other bifurcation cases
%--------the code----
global mu syms x y figure(1) Critical_points=solve('mu*x-x^2','-y'); Plot_critical_points_x_p=ezplot(Critical_points.x(1),[-2,2]);hold on set(Plot_critical_points_x_p,'color',[0.5 0.5 0.5], 'Linewidth', 1); Plot_critical_points_x_m=ezplot(Critical_points.x(2),[-2,2]); set(Plot_critical_points_x_m,'color','black','linestyle','--', 'Linewidth', 1) legend('stable solution', 'unstable solution') title(['Bifurcation Diagram',' Trans_Critical_Bifurcation']); axis ([-2 2 -2 2])

採用された回答

Youssef  Khmou
Youssef Khmou 2015 年 2 月 3 日
The ezplot function returns the following error message :
Input must be a string expression, function name, function handle, or INLINE object
the result is mu, so a constant, but if you use function it works correctly, here is an example :
ezplot(cos(Critical_points.x(2)))
  2 件のコメント
Pablo Garcia
Pablo Garcia 2015 年 2 月 3 日
Ok, many thanks. It works using inline with the constant mu.
Youssef  Khmou
Youssef Khmou 2015 年 2 月 3 日
編集済み: Youssef Khmou 2015 年 2 月 3 日
Correct, inline is the right option.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunction Creation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by