loading vectors with multiple dimensions from a .txt file
Mostrar comentarios más antiguos
I have saved vectors line by line to .txt file. Now i want to load them one by one. Problem is that, vectors have different dimensions and dimensions are unknown.
The .txt file that i'm using is similar to the testing2.txt which is generated by the following code.
A = rand(28,1);
B = rand(15,1);
C = rand(36,1);
fid=fopen('testing2.txt','w');
fprintf(fid, '%f ', A);
fprintf(fid, '\n ');
fprintf(fid, '%f ', B);
fprintf(fid, '\n ');
fprintf(fid, '%f ', C);
fprintf(fid, '\n ');
fclose(fid);
Can anyone help?? Thanks in advance.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!