I need to save some data in a .txt file, which works great except for this one line.
%Writing the rest of the Data to the file
fprintf(fid, '%u',speedNum);
fprintf(fid, ' ');
fprintf(fid,speedUnit); %That would be the line
in speedUnit are different values (none work) one of which is: 'Frames per Min '
The error I get is:
Error using fprintf Invalid format.
Error in RackWriter>tag_OnOff_Callback (line 414) fprintf(fid,speedUnit);
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in RackWriter (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)RackWriter('tag_OnOff_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
Can somebody help me??? Thank you so much in advance