How to Stop Plot Title From Seperating Into Several Lines
    조회 수: 10 (최근 30일)
  
       이전 댓글 표시
    
Hi guys,
My line is:
title  ( [ 'compare:' , (variable) ] )
The title is displayed correctly, but it is seprated into several lines because variable is a cell array.
Could someone help me with this please? :)
답변 (1개)
  Anmol Dhiman
    
 2020년 6월 23일
        Hi Gina,
Assuming there are 2 elements in your cell array. You can use
 title  ( [ strcat('Compare: ', variable{1}, variable{2}) ] )
If there are more elements, you can write a script to generate a string and use it in title as shown below
 titleString = "Compare :";
 for i =1:numel(a)
    titleString = strcat(str1, a{i});
 end
 title([titleString]);
where a is the input cell array.
Regards,
Anmol Dhiman
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Argument Definitions에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

