Effacer les filtres
Effacer les filtres

plot help

1 vue (au cours des 30 derniers jours)
Nasir Qazi
Nasir Qazi le 6 Mar 2012
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?

Réponses (1)

Walter Roberson
Walter Roberson le 6 Mar 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!
  1 commentaire
Nasir Qazi
Nasir Qazi le 6 Mar 2012
how do I get the values then ? how do i reach to bublept and get these values . ?

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by