.txt ( and not the automatic.mat) using save with num2str option
Show older comments
Hi all, I have this code:
for l=1:nelettrodi
for j=l+1:nelettrodi
for k=j+1:nelettrodi
V_ = V_I(l)+V_I(j)+V_I(k);
save(['V_', num2str(l), num2str(j),num2str(k)],'V_')
My problem is that this save the variable V_ in a .mat file, but I want it to be a .txt. I tried this:
save(['V_', num2str(l), num2str(j),num2str(k)]'.txt','V_')
and it seems like it does the jobs. I say it seems since it saves it as a .txt file but the content of this file is just some line with strange symbols. I need a .txt file because another program has to use this variable and can read only .txt. Thank you very much for your time, Giorgio.
Accepted Answer
More Answers (0)
Categories
Find more on Licensing on Cloud Platforms 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!