Error plotting invalid second data argument
조회 수: 1 (최근 30일)
이전 댓글 표시
I like to make 2 PLOTS, but I getan error messages. I use the same x-values, a cell array I have made PLOTS with hese values earlier. The problem are caused by the Y values. The PLOTs (called real) gives the error Invalid second data argument. Although i used the same code the Y-values dont look the same. the values TC, TC2 and sf/IR are
if true
% code
TC = cell2mat(TC);
TC2 = cell2mat(TC2);
SF = cell2mat(SF);
for U = 1:b
temperatuurreal{1,U}(1:TC(1,U),1)=celldata{1,U}(1:TC(1,U),6);
temperatuurreal{1,U}(TC(1,U)+1:TC(1,U)+SF(1,U),1)=celldata{1,U}(TC(1,U)+1:TC(1,U)+SF(1,U),8);
temperatuurreal{1,U}(TC(1,U)+SF(1,U)+1:TC(1,U)+SF(1,U)+TC2(1,U),1)=celldata{1,U}(TC(1,U)+SF(1,U)+1:TC(1,U)+SF(1,U)+TC2(1,U),6);
temperatuurset{1,U}(1:TC(1,U),1)=celldata{1,U}(1:TC(1,U),5);
temperatuurset{1,U}(TC(1,U)+1:TC(1,U)+SF(1,U),1)=celldata{1,U}(TC(1,U)+1:TC(1,U)+SF(1,U),7);
temperatuurset{1,U}(TC(1,U)+SF(1,U)+1:TC(1,U)+SF(1,U)+TC2(1,U),1)=celldata{1,U}(TC(1,U)+SF(1,U)+1:TC(1,U)+SF(1,U)+TC2(1,U),5);
end
laatste=b;
%axis([tMin tMax 0.5 2.2]);
while laatste > 0
figure('Name','setpoint and real')
%plot(x{1,b}(:,1),temperatuurreal{1,b}(:,1))
hold on
plot(x{1,b}(:,1),temperatuurset{1,b}(:,1))
title('setpointenreal')
xlabel('tijd(s)')
ylabel('temperatuur(C)')
legend(num(1,1:b))
b=b-1;
end
end
댓글 수: 3
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!