Write a text file with dynamically name from solve the system 972 equations
Show older comments
Hi, I have big problem with 972 equations and 972 variables which have from like: x1, x2,...,x27 (x will be change).
I must creat a txt file with:
x1, value(x1)
x2, value(x2)
....................
x27, value(x27)
Now I just can write a simple code like that:
id = fopen('inputabaqus.txt','w');
fprintf(id,'%s %.4f',"x1,",double(S.x1));
I don't want to repeat it 972 times so can I use the loop with using 'eval':
(open file)
for i=1:27
fprintf(id,'x(i)',double(S.xi)); (sorry I have not figured out how to write this just ideal)
end
(close)
Thank for your help !!!
Answers (0)
Categories
Find more on Variables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!