Make matlab save results to the same table but different rows
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Thor
el 4 de Mayo de 2021
Comentada: Thor
el 14 de Mayo de 2021
Hi I got a while loop that calculates the size of a vector for several columns of data. I was wondering if there is a method to save all the outputs to one table in different rows. Many thanks in advance.
0 comentarios
Respuesta aceptada
Adam Danz
el 4 de Mayo de 2021
I would store the values within the while loop and then convert the array to a table using array2table.
rng('default')
x = [];
z = rand();
while z > .01
x(end+1) = z;
z = rand();
end
T = array2table(x(:),'VariableName',{'myVar'})
6 comentarios
Adam Danz
el 4 de Mayo de 2021
Sure, include only the relevant sections, describe the size of your data, and share any error messages you're getting.
Más respuestas (0)
Ver también
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!