Writing to a CSV file
Show older comments
So I wrote some code and need to output my variables, that are in a cell array, to a csv file. The code below shows how I attempt to do it, but I get the error of, "function is not defined for 'cell' inputs."
fid = fopen('Masonry.csv', 'w');
for n = 1:numel(numberRows)
fprintf(fid, '%s', NameofTypeMasonry(n));
fprintf(fid, '%s', CountryofTypeMasonry(n));
fprintf(fid, '%s', CityofTypeMasonry(n));
fprintf(fid, '%d', HeightofTypeMasonry(n));
end
does anyone have any idea how to fix this?
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Types 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!