loading vectors with multiple dimensions from a .txt file
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!