plot help
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
J(2,:) = bublept();
O(1,:) = bublept();
plot(rslt(2,:),rslt(1,:),'-- ks','MarkerFaceColor','r','LineSmoothing','on')
hold all
plot(J(2,:),O(1,:),'-- ks','MarkerFaceColor','r','LineSmoothing','on')
xlim([100 280])
ylim([0 8])
xlabel('Temperature in K')
ylabel('Pressure in MPa')
title('Dew Point-curve')
% I am trying to plot this , the first one has no problem the 2nd one does have a problem and unable to plot , please note J(2,:) & O(1,:) is located in another function file (bublept). could you tell me why it is not plotting?
0 Kommentare
Antworten (1)
Walter Roberson
am 6 Mär. 2012
Unless your function bublept() has magic to know how many times it has been called, or unless it creates random values, then
J(2,:) = bublept();
O(1,:) = bublept();
would be assigning the same output to J(2,:) as to O(1,:) . Then when one was plotted against the other, you would get a straight line.
If you are thinking that the syntax
J(2,:) = bublept();
means that MATLAB should look inside the function bublept and find an assignment there to a variable named "J" and that it should copy that J value out to the calling function -- if that is what you are thinking, then functions do not work anything like that!
Siehe auch
Kategorien
Mehr zu Graphics Objects 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!