Hi,
Following Code might help write csv file in above format
text_file = fileread('test_text.txt');
content = regexp(text_file, ';', 'split');
content( cellfun(@isempty,content) ) = [];
table_to_write = cell2table(cell(size(content,2),3));
for i=1:size(content,2)
string_cell = content(1,i);
actual_string = string_cell{1};
first = regexp(actual_string, '=', 'split');
first( cellfun(@isempty,first) ) = [];
third_arg = char(first(1,2));
second = regexp(first{1}, '.', 'split');
second( cellfun(@isempty,second) ) = [];
first_arg = strtrim(second{1});
second_arg = strjoin(second(1,2:3),'\.');
table_to_write.Var1(i) = {first_arg};
table_to_write.Var2(i) = {second_arg};
table_to_write.Var3(i) = {third_arg};
end
writetable(table_to_write,'csvFile.csv','WriteVariableNames',false,'Delimiter',',');
For Reading the csv file again in MATLAB note that the delimiter must be 'comma'(',').