Not enough input arguments error
이전 댓글 표시
Hi all; I am plotting data from excel file by using MATLAB these data are:
x-Axis = time (from excel)
y-Axis = power (from excel)
but I am getting this error while plotting:
Not enough input arguments.
my code is :
[num,T,vT] = xlsread('Excel.xlsx','Sheet1'); % read excel
x= datestr(num(:,1),('HH:MM')); % time column
y = num(:,4); % power column
plot(handles.axes8,x,y);
why I am getting this error ? and how to solve it ?? please please help and advice... thank you very much
댓글 수: 3
Richard
2012년 8월 28일
what happens when you type plot(x,y) ?
Image Analyst
2012년 8월 28일
Don't paraphrase it. Copy and paste all, yes ALL, the red text.
Samer Husam
2012년 8월 28일
채택된 답변
추가 답변 (1개)
Samer Husam
2012년 8월 29일
댓글 수: 3
Walter Roberson
2012년 8월 29일
The first output returned by xlsread is always a numeric array. You are then taking a portion of that numeric array and attempting to convert it to a date number as if it is a string. But it isn't a string.
Perhaps you should be passing T(:,1) in to datenum()
Samer Husam
2012년 8월 29일
Walter Roberson
2012년 8월 29일
Your code in your original Question shows you passing part of "num" to datenum(), rather than passing part of "T" to datenum(). Have you tried with "T" ? Could you show an example string that you are passing to datenum() ?
카테고리
도움말 센터 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!