Array indices must be positive integers or logical values.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Alvaro Mª Zumalacarregui Delgado
am 23 Feb. 2021
Kommentiert: Alvaro Mª Zumalacarregui Delgado
am 23 Feb. 2021
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')
2 Kommentare
Stephen23
am 23 Feb. 2021
t = 0:0.2:100;
y(t) = .. % t is not positive integer
y(0) = .. % 0 is not positive integer
Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!