필터 지우기
필터 지우기

String into plot properties

조회 수: 4 (최근 30일)
Rene Riha
Rene Riha 2018년 3월 17일
댓글: Rik 2018년 3월 17일
Hello, how can I insert string into plot properties? For example I have cell u=[{'k*'}, {'k-'}] and I want plot(x, y, u(1)) but this shows 'Invalid first data argument'. Any solutions? Thank you very much.
  댓글 수: 1
Rik
Rik 2018년 3월 17일
Actually, it looks like the x is the first problem you're having. The second problem is that you're using matrix indexing to get a cell in your plot. You should use plot(x, y, u{1})

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

채택된 답변

Rene Riha
Rene Riha 2018년 3월 17일
Thank you, solution was type u={'ko', 'k-'}. Then it works.
  댓글 수: 1
Rik
Rik 2018년 3월 17일
You are aware that both syntaxes result in the same shape of the same data type?

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by