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!