Martix is getting updated with the value of e,Without adding a new column, Please help me.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
kintali narendra
el 2 de Jun. de 2016
Comentada: Walter Roberson
el 2 de Jun. de 2016
persistent eWithDeltaL;
eWithDeltaL = [];
eWithDeltaL(end+1) = e;
0 comentarios
Respuesta aceptada
Walter Roberson
el 2 de Jun. de 2016
You are overwriting eWithDeltaL with [] every time. You should have the assignment of [] to the variable only when you know that you want to reset the variable.
2 comentarios
Walter Roberson
el 2 de Jun. de 2016
When you declare a variable as persistent, it is automatically assigned [] if it does not already exist. You do not need to initialize it to [] unless you want to reset it.
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!