필터 지우기
필터 지우기

adding a title to a figure - by a loop

조회 수: 2 (최근 30일)
alex
alex 2011년 11월 26일
댓글: K R 2017년 5월 18일
I am trying to run with a loop where i have a parameter X when X = {'asd','asdf','sfdf','sd',....} and i want in every loop run to add to the title of the figure it's name.. I tried title(X(i),'dsfsdaasdsadf..') or tile('X(i)','sdfdsvsccvsd...') and nothing seems to work the end result that i am looking for is a bunch of figures that have the title i wanted by the order in X.. how can I do that?

채택된 답변

Chandra Kurniawan
Chandra Kurniawan 2011년 11월 26일
Something like this??
clear all; clc;
X = {'asd','asdf','sfdf','sd'};
for i = 1 : length(X)
figure('name',X{i},'numbertitle','off');
end
  댓글 수: 4
Suene
Suene 2015년 8월 17일
many thanks for sharing!
K R
K R 2017년 5월 18일
Same code will it work for surf instead of normal 2d

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by