Array indices must be positive integers or logical values.

1 view (last 30 days)
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')

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!