How to write data into .txt file
Show older comments
How should i write the AVG and standard deviation data into .txt file?
d = 'E:\\ \\ DummyFile\\';
filePattern = fullfile(d, 'Run*');
file = dir(filePattern)
n = length(file)
for k = 1:n
baseFileName = file(k).name;
FullFileName = fullfile(d, baseFileName, 'dummy.csv');
temp = readtable(FullFileName, 'ReadVariableNames' true, 'ReadRowsNames' true);
x(:, :, k) = temp(:, :);
end
%Finding Average and Std
Avg = mean(x,3);
Standard_deviation = std(x,0,3)
Accepted Answer
More Answers (1)
madhan ravi
on 6 Jul 2020
Edited: madhan ravi
on 6 Jul 2020
doc writematrix % after converting your data into a table
%or
doc dlmwrite
Categories
Find more on Statistics and Machine Learning Toolbox 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!