Filter löschen
Filter löschen

Error plotting invalid second data argument

1 Ansicht (letzte 30 Tage)
Eliah Verbeemen
Eliah Verbeemen am 25 Mai 2018
Kommentiert: Maria am 25 Mai 2018
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 Kommentare
Eliah Verbeemen
Eliah Verbeemen am 25 Mai 2018
Bearbeitet: Eliah Verbeemen am 25 Mai 2018
I provided an example of TC. SF/IR en TC2 are comparable.
Maria
Maria am 25 Mai 2018
I do not see any .mat attachment. Am I missing something?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by