フィルターのクリア

I can't put two functions together with the command hold

2 ビュー (過去 30 日間)
I am trying to put in the same axes two functions with the command hold but i don't accomplish it, this is my code
function Calcular1ValueChanged(app, event)
P = 50;
Q = 60;
C1 = 4;
C2 = 7;
a = app.a.Value;
b = app.b.Value;
x = linspace(0,100);
y1 = C1*exp(sqrt(a*b)*x) + C2*exp(-sqrt(a*b)*x) - P/a;
plot (app.Axes,x,y1,'b');
hold on
y = linspace(0,100);
x1 = - C1*exp(sqrt(a*b)*y) - C2*exp(-sqrt(a*b)*y) + Q/b;
plot (app.Axes,x1,y,'g');
end
thanks

採用された回答

Walter Roberson
Walter Roberson 2021 年 2 月 20 日
hold(App.Axes,'on')
When you use app designer, the "current" axes is hidden and is not found as the "active" axes when you use "hold"
  1 件のコメント
Alvaro Mª Zumalacarregui Delgado
Alvaro Mª Zumalacarregui Delgado 2021 年 2 月 20 日
thanks! now i can see both in the same axes

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by