Borrar filtros
Borrar filtros

recalling the values as a row matrix

2 visualizaciones (últimos 30 días)
Offroad Jeep
Offroad Jeep el 16 de Sept. de 2015
Comentada: dpb el 17 de Sept. de 2015
Hi to all, the program attached satisfy the conditions. now I want that the values which are obtained for theta can be seen all together, when i write theta it tells only the last value........ e.g, for example the loop has n values till reaching the final condition, so when i write theta i can see like this
theta = n1 n2 n3 till nn
what command should i write to get all the values on screen........ Thanks in advance............
  2 comentarios
Walter Roberson
Walter Roberson el 17 de Sept. de 2015
The logic of that code is strange. With your code
theta1 = theta+dtheta(i)
if theta1 > theta
that is going to be true only if dtheta(i) > 0 . If that is what you want to test, why not test it more directly?
Offroad Jeep
Offroad Jeep el 17 de Sept. de 2015
Any other good idea please..........

Iniciar sesión para comentar.

Respuestas (1)

dpb
dpb el 16 de Sept. de 2015
Preallocate theta before the loop...
theta=zeros(1,nmc);
Then, store each value when computed by writing
theta(i)=...
where you currently only have
theta=...
  2 comentarios
Offroad Jeep
Offroad Jeep el 17 de Sept. de 2015
Can you please correct in the program........ Its giving error to me
dpb
dpb el 17 de Sept. de 2015
Show your work and the error(s) you get...

Iniciar sesión para comentar.

Categorías

Más información sobre Logical 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!

Translated by