Hello,
I am trying to achieve this string in a .txt file.
SPCD,1,1,3,1.9628e-05
and not this S,P,C,D,1,1,3,1,.,9,6,2,8,e,-,0,5
I have the following data in MATLAB:
n=12;
node_num=linspace(1,n,n)';
A = [1.96276396551253e-05,NaN,1.96298099346691e-05,1.96279640136501e-05;1.96276396551253e-05,NaN,1.96298099346691e-05,1.96279640136501e-05;1.96276396551253e-05,NaN,1.96298099346691e-05,1.96279640136501e-05;]
SPC = reshape(A,n,1);
for j = 1:n
R = {char('SPCD'), num2str(1), num2str(j), num2str(3), num2str(SPC(j))}; dlmwrite('try2.txt', R,'precision', '%.10f','newline', 'pc','-append');
end
I hope this makes sense and you can help. Thank you in advance. Sausan
Best Answer