Changing the Title of a plot in a nested loop

조회 수: 5 (최근 30일)
Hans123
Hans123 2019년 2월 5일
답변: Jos (10584) 2019년 2월 6일
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

채택된 답변

Jos (10584)
Jos (10584) 2019년 2월 6일
k = 3 ;
str = sprintf('Run %d', k)
title(str)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by