Array indices must be positive integers or logical values.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Alvaro Mª Zumalacarregui Delgado
el 23 de Feb. de 2021
Comentada: Alvaro Mª Zumalacarregui Delgado
el 23 de Feb. de 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 comentarios
Stephen23
el 23 de Feb. de 2021
t = 0:0.2:100;
y(t) = .. % t is not positive integer
y(0) = .. % 0 is not positive integer
Respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!