MATLAB: Insert Text in plot MATLABplot Hi, I want to insert text at particular intervals in a plot. What command should I use? Amit Best Answer text(x,y,'yourtext') Related SolutionsMATLAB: How can a put a variable into a text string Use the sprintf function:text(x, y, sprintf('Text %f more text', variable))NOTE — This is UNTESTED CODE but it should work. Change the format descriptor in sprintf as necessary to provide the result you want. MATLAB: Plot text box question text(0,800,sprintf('n=%d',n) %for integerstext(0,800,sprintf('n=%.3f',pi) %for non-integers (showing 3dp) Related QuestionInserting differentiation delta textText in 3D plotInsert text box in subplotHow to set text size in axes units
Best Answer