I have a text file having sentences.I want to edit and print each sentence in a new line .I successfully edited but find difficulty in printing
fid1=fopen('edited_sentences_program3.txt','r');fid2=fopen('edited_sentences_program4','w');while ~ feof(fid1)new_line = fgetl(fid1);a=new_line;b=strsplit(a);c=[b(end) b];c(end)=[]; fprintf(fid2,'%s\n',c)endfclose(fid1);fclose(fid2);
when I run the code ;error is
"Function is not defined for 'cell' inputs." for line fprintf(fid2,'%s\n',c)
Best Answer