필터 지우기
필터 지우기

How to avoid legend error?

조회 수: 3 (최근 30일)
Ezz El-din Abdullah
Ezz El-din Abdullah 2017년 3월 14일
댓글: KSSV 2017년 3월 16일
I keep receiving this error:
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
I solve it by making the length of the string the same. Like this example:
legend(['x9';'x10']) %this will produce the error
legend(['x9_';'x10']) %solution
But this is not what I want especially when the string gets lengthy. So please, is there another solution?

답변 (1개)

KSSV
KSSV 2017년 3월 15일
편집: KSSV 2017년 3월 15일
legend(['x9' ,'x10'])
  댓글 수: 2
Ezz El-din Abdullah
Ezz El-din Abdullah 2017년 3월 15일
How can it be a row vector?!
It will then produce just one legend (with the same color)
KSSV
KSSV 2017년 3월 16일
Yes you are right....This will work.
legend({'x9' ; 'x10'})

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by