필터 지우기
필터 지우기

Error using plot Invalid first data argument

조회 수: 1 (최근 30일)
mohan khedkar
mohan khedkar 2019년 11월 2일
답변: Walter Roberson 2019년 11월 2일
Hello,i am plotting data(voltage) with respect to time but getting error like 'Invalid first data argument' while size of both the matrices are same.i am getting data in the form of char.So,firstly should i convert this char data in int data? If this is right,then how can i do it? I am very new to this matlab platform,so please suggest me.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 11월 2일
MATLAB cannot plot char, or cell array of character vectors, or strings. None of those are considered ordered -- MATLAB cannot figure out where '23 skidoo' should be placed relative to 'charlie brown' for example.
MATLAB can plot categorical values that have been converted from char or cell array of character vectors or strings, because creating categorical values assigns a specific value to each entry. It might only be a sequential integers, but it is at least some numeric value.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by