MATLAB: How to display the celcius sumbol (°C) using fprint? fprint symbols I am creating an output file using fprint and want to display the unit of temperature in Celcius. Anyone knows how to do this? Best Answer Here are four methods:fid = fopen('temp.txt','wt');fprintf(fid,'symbol one: °C\n');fprintf(fid,'symbol two: %cC\n',176);fprintf(fid,'symbol three: %cC\n',char(176));fprintf(fid,'symbol four: \260C\n');fclose(fid);And the generated file:symbol one: °Csymbol two: °Csymbol three: °Csymbol four: °CEDIT: Added octal syntax based on Walter Roberson's comment. Related SolutionsMATLAB: How to modify text file I wasn't giving fopen a permission. Should have written:fileID = fopen('equations.txt','w');fprintf(fileID,'"L_Chamber"= %8.3f\n',L_Chamber); MATLAB: How do i Extract certain values from a list using a for loop and if statements for n = 1 : nAbsif Absences(n) == 1 || Absences(n) == 2 fprintf('\n%5i \t\t\t %i\n',StudentNumber(n),Absences(n))endend Related QuestionValues not getting printed in csv fileError: File: Expression or statement is incorrect–possibly unbalanced (, {, or [Reading a .dat file with textreadPutting files with numeral string names into numeric order
Best Answer