Array indices must be positive integers or logical values.

1 次查看(过去 30 天)
I am trying to represent to functions in matlab app designer but when I run the interface and click the buttom the app send me this mesage:'Array indices must be positive integers or logical values.'. How can I solve? this is my code:
P = app.P.Value;
Q = app.Q.Value;
a = app.a.Value;
b = app.b.Value;
Xo = app.Xo.Value;
Yo =app.Yo.Value;
K = b.*Xo-a.*Yo;
C3 = (log(a.*Yo)-log(Xo))/- K;
C4 = (log(b.*Xo)-log(Yo))/- K;
t = 0:0.2:100;
y(t) = K./(exp((K*t-K*C3))-b);
y (0) = app.Yo.Value;
plot (app.Axes,x,y3,'r');
hold (app.Axes,'on')
x(t) = - K./(exp(K*t-K*C4)-a);
x(0) = app.Xo.Value;
plot (app.Axes,x,y4,'b');
hold (app.Axes,'off')

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by