MATLAB Answers

0

Changing the Title of a plot in a nested loop

Hans123 님이 질문을 제출함. 5 Feb 2019
최근 활동 Jos (10584) 님이 답변함. 6 Feb 2019
I have a Nested Loop that runs multiple iterations, and each iteration is going to spit out a plot.
I want to know whether there is a method to get the iteration number in the title itself, i.e "Plot from Run 1"
something like fprinf with strings, but with the title function

  댓글 수: 0

로그인 to comment.

제품


릴리스

R2017b

답변 수: 1

Answer by Jos (10584)
on 6 Feb 2019
 Accepted Answer

k = 3 ;
str = sprintf('Run %d', k)
title(str)

  댓글 수: 0

로그인 to comment.



Translated by